Video coding and decoding

ABSTRACT

A method of encoding a motion information predictor index for an Affine Merge mode, comprising: generating a list of motion information predictor candidates; selecting one of the motion information predictor candidates in the list as an Affine Merge mode predictor; and generating a motion information predictor index for the selected motion information predictor candidate using CABAC coding, one or more bits of the motion information predictor index being bypass CABAC coded.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the National Phase application of PCT ApplicationNo. PCT/EP2019/078436, filed on Oct. 18, 2019 and titled “VIDEO CODINGAND DECODING”. This application claims the benefit under 35 U.S.C. §119(a)-(d) of United Kingdom Patent Application No. 1817020.9, filed onOct. 18, 2018. The above cited patent applications are incorporatedherein by reference in their entirety.

FIELD OF INVENTION

The present invention relates to video coding and decoding.

BACKGROUND

Recently, the Joint Video Experts Team (JVET), a collaborative teamformed by MPEG and ITU-T Study Group 16's VCEG, commenced work on a newvideo coding standard referred to as Versatile Video Coding (VVC). Thegoal of VVC is to provide significant improvements in compressionperformance over the existing HEVC standard (i.e., typically twice asmuch as before) and to be completed in 2020. The main targetapplications and services include—but not limited to—360-degree andhigh-dynamic-range (HDR) videos. In total, JVET evaluated responses from32 organizations using formal subjective tests conducted by independenttest labs. Some proposals demonstrated compression efficiency gains oftypically 40% or more when compared to using HEVC. Particulareffectiveness was shown on ultra-high definition (UHD) video testmaterial. Thus, we may expect compression efficiency gains well-beyondthe targeted 50% for the final standard.

The JVET exploration model (JEM) uses all the HEVC tools. A further toolnot present in HEVC is to use an ‘affine motion mode’ when applyingmotion compensation. Motion compensation in HEVC is limited totranslations, but in reality there are many kinds of motion, e.g. zoomin/out, rotation, perspective motions and other irregular motions. Whenutilising affine motion mode, a more complex transform is applied to ablock to attempt to more accurately predict such forms of motion. So itwould be desirable if the affine motion mode can be used whilstachieving a good coding efficiency but with less complexity.

Another tool not present in HEVC is to use Alternative Temporal MotionVector Prediction (ATMVP). The alternative temporal motion vectorprediction (ATMVP) is a particular motion compensation. Instead ofconsidering only one motion information for the current block from atemporal reference frame, each motion information of each collocatedblock is considered. So this temporal motion vector prediction gives asegmentation of the current block with the related motion information ofeach sub-block. In the current VTM (VVC Test Model) reference software,ATMVP is signalled as a merge candidate inserted in the list of Mergecandidates. When ATMVP is enabled at SPS level, the maximum number ofMerge candidates is increased by one. So 6 candidates are consideredinstead of 5 when this mode is disabled.

These, and other tools described later, are bringing up problemsrelating to the coding efficiency and complexity of the coding of anindex (e.g. a Merge index) used to signal which candidate is selectedfrom among the list of candidates (e.g. from a list of Merge candidatesfor use with a Merge mode coding).

Accordingly, a solution to at least one of the aforementioned problemsis desirable.

According to a first aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates including anATMVP candidate;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index (Merge index) for theselected motion vector predictor candidate using CABAC coding, one ormore bits of the motion vector predictor index being bypass CABAC coded.

In one embodiment, all bits except for a first bit of the motion vectorpredictor index are bypass CABAC coded.

According to a second aspect of the present invention there is provideda method of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates including anATMVP candidate;

decoding the motion vector predictor index using CABAC decoding, one ormore bits of the motion vector predictor index being bypass CABACdecoded; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment, all bits except for a first bit of the motion vectorpredictor index are bypass CABAC decoded.

According to a third aspect of the present invention there is provided adevice for encoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidatesincluding an ATMVP candidate;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index (Merge index) forthe selected motion vector predictor candidate using CABAC coding, oneor more bits of the motion vector predictor index being bypass CABACcoded.

According to a fourth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidatesincluding an ATMVP candidate;

means for decoding the motion vector predictor index using CABACdecoding, one or more bits of the motion vector predictor index beingbypass CABAC decoded; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a fifth aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, two or more bits of themotion vector predictor index sharing the same context.

In one embodiment, all bits of the motion vector predictor index sharethe same context.

According to a sixth aspect of the present invention there is provided amethod of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, two ormore bits of the motion vector predictor index sharing the same context;and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment, all bits of the motion vector predictor index sharethe same context.

According to a seventh aspect of the present invention there is provideda device for encoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, two or more bitsof the motion vector predictor index sharing the same context.

According to an eighth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, two or more bits of the motion vector predictor index sharingthe same context; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a ninth aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a motion vector predictor index of at least oneblock neighbouring the current block.

In one embodiment the context variable for at least one bit of themotion vector predictor index depends on the respective motion vectorpredictor indexes of at least two neighbouring blocks.

In another embodiment the context variable for at least one bit of themotion vector predictor index depends on a motion vector predictor indexof a left neighbouring block on the left of the current block and on amotion vector predictor index of an upper neighbouring block above thecurrent block.

In another embodiment the left neighbouring block is A2 and the upperneighbouring block is B3.

In another embodiment the left neighbouring block is A1 and the upperneighbouring block is B1.

In another embodiment the context variable has 3 different possiblevalues.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with an index value of the motionvector predictor index of the current block and setting said contextvariable in dependence upon the comparison result.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with a parameter representing a bitposition of the or one said bit in the motion vector predictor index ofthe current block and setting said context variable in dependence uponthe comparison result.

Yet another embodiment comprises: making a first comparison, comparingthe motion vector predictor index of a first neighbouring block with aparameter representing a bit position of the or one said bit in themotion vector predictor index of the current block; making a secondcomparison, comparing the motion vector predictor index of a secondneighbouring block with said parameter; and setting said contextvariable in dependence upon the results of the first and secondcomparisons.

According to a tenth aspect of the present invention there is provided amethod of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on a motion vector predictor index ofat least one block neighbouring the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the context variable for at least one bit of themotion vector predictor index depends on the respective motion vectorpredictor indexes of at least two neighbouring blocks.

In another embodiment the context variable for at least one bit of themotion vector predictor index depends on a motion vector predictor indexof a left neighbouring block on the left of the current block and on amotion vector predictor index of an upper neighbouring block above thecurrent block.

In another embodiment the left neighbouring block is A2 and the upperneighbouring block is B3.

In another embodiment the left neighbouring block is A1 and the upperneighbouring block is B1.

In another embodiment the context variable has 3 different possiblevalues.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with an index value of the motionvector predictor index of the current block and setting said contextvariable in dependence upon the comparison result.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with a parameter representing a bitposition of the or one said bit in the motion vector predictor index ofthe current block and setting said context variable in dependence uponthe comparison result.

Yet another embodiment comprises: making a first comparison, comparingthe motion vector predictor index of a first neighbouring block with aparameter representing a bit position of the or one said bit in themotion vector predictor index of the current block; making a secondcomparison, comparing the motion vector predictor index of a secondneighbouring block with said parameter; and setting said contextvariable in dependence upon the results of the first and secondcomparisons.

According to an eleventh aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a motion vector predictor index of at least oneblock neighbouring the current block.

According to a twelfth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on a motion vectorpredictor index of at least one block neighbouring the current block;and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a Skip flag of said current block.

According to a fourteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is available prior to decoding of the motion vectorpredictor index.

According to a fifteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is an indicator of a complexity of motion in thecurrent block.

According to a sixteenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on a Skip flag of said current block;and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a seventeenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on another parameter or syntax elementof said current block that is available prior to decoding of the motionvector predictor index; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to an eighteenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on another parameter or syntax elementof said current block that is an indicator of a complexity of motion inthe current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a nineteenth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a Skip flag of said current block.

According to a twentieth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is available prior to decoding of the motion vectorpredictor index.

According to a twenty-first aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is an indicator of a complexity of motion in thecurrent block.

According to a twenty-second aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on a Skip flag of saidcurrent block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-third aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on another parameteror syntax element of said current block that is available prior todecoding of the motion vector predictor index; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-fourth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on another parameteror syntax element of said current block that is an indicator of acomplexity of motion in the current block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-fifth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on Affine Motion vector predictor candidates, ifany, in the list.

In one embodiment the context variable depends on position in said listof a first Affine Motion vector predictor candidate.

According to a twenty-sixth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on Affine Motion vector predictorcandidates, if any, in the list; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the context variable depends on position in said listof a first Affine Motion vector predictor candidate.

According to a twenty-seventh aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on Affine Motion vector predictor candidates, ifany, in the list.

According to a twenty-eighth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on Affine Motionvector predictor candidates, if any, in the list; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-ninth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on an affine flag of the current block and/or ofat least one block neighbouring the current block.

According to a thirtieth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on an affine flag of the current blockand/or of at least one block neighbouring the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-first aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on an affine flag of the current block and/or ofat least one block neighbouring the current block.

According to a thirty-second aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on an affine flag ofthe current block and/or of at least one block neighbouring the currentblock; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirty-third aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block is derived from a context variable of at least one of aSkip flag and an affine flag of the current block.

According to a thirty-fourth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block is derived from a context variable of at leastone of a Skip flag and an affine flag of the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-fifth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block is derived from a context variable of at least one of aSkip flag and an affine flag of the current block.

According to a thirty-sixth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block is derived from a contextvariable of at least one of a Skip flag and an affine flag of thecurrent block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirty-seventh aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block has only two different possible values.

According to a thirty-eighth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block has only two different possible values; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-ninth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block has only two different possible values.

According to a fortieth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block has only two differentpossible values; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

Yet further aspects of the present invention relate to programs whichwhen executed by a computer or processor cause the computer or processorto carry out any of the methods of the aforementioned aspects. Theprogram may be provided on its own or may be carried on, by or in acarrier medium. The carrier medium may be non-transitory, for example astorage medium, in particular a computer-readable storage medium. Thecarrier medium may also be transitory, for example a signal or othertransmission medium. The signal may be transmitted via any suitablenetwork, including the Internet.

Yet further aspects of the present in invention relate to a cameracomprising a device according to any of the aforementioned deviceaspects. In one embodiment the camera further comprises zooming means.

According to a forty-first aspect of the present invention there isprovided a method of encoding a motion information predictor index,comprising: generating a list of motion information predictorcandidates; when an Affine Merge mode is used, selecting one of themotion information predictor candidates in the list as an Affine Mergemode predictor; when a non-Affine Merge mode is used, selecting one ofthe motion information predictor candidates in the list as a non-AffineMerge mode predictor; and generating a motion information predictorindex for the selected motion information predictor candidate usingCABAC coding, one or more bits of the motion information predictor indexbeing bypass CABAC coded.

Suitably, the CABAC coding comprises using the same context variable forat least one bit of the motion information predictor index of a currentblock when the Affine Merge mode is used and when the non-Affine Mergemode is used. Alternatively, the CABAC coding comprises, for at leastone bit of the motion information predictor index of a current block,using a first context variable when the Affine Merge mode is used orusing a second context variable when the non-Affine Merge mode is used;and the method further comprises including data for indicating use ofthe Affine Merge mode in a bitstream when the Affine Merge mode is used.

Suitably, the method further comprises including data for determining amaximum number of motion information predictor candidates includable inthe generated list of motion information predictor candidates in abitstream. Suitably, all bits except for a first bit of the motioninformation predictor index are bypass CABAC coded. Suitably, the firstbit is CABAC coded. Suitably, the motion information predictor index forthe selected motion information predictor candidate is encoded using thesame syntax element when the Affine Merge mode is used and when thenon-Affine Merge mode is used.

According to a forty-second aspect of the present invention there isprovided a method of decoding a motion information predictor index,comprising: generating a list of motion information predictorcandidates; decoding the motion information predictor index using CABACdecoding, one or more bits of the motion information predictor indexbeing bypass CABAC decoded; when an Affine Merge mode is used, using thedecoded motion information predictor index to identify one of the motioninformation predictor candidates in the list as an Affine Merge modepredictor; and when a non-Affine Merge mode is used, using the decodedmotion information predictor index to identify one of the motioninformation predictor candidates in the list as a non-Affine Merge modepredictor.

Suitably, the CABAC decoding comprises using the same context variablefor at least one bit of the motion information predictor index of acurrent block when the Affine Merge mode is used and when the non-AffineMerge mode is used. Alternatively, the method further comprisesobtaining, from a bitstream, data for indicating use of the Affine Mergemode, and the CABAC decoding comprises, for at least one bit of themotion information predictor index of a current block: when the obtaineddata indicates use of the Affine Merge mode, using a first contextvariable; and when the obtained data indicate use of the non-AffineMerge mode, using a second context variable.

Suitably, the method further comprises obtaining, from a bitstream, datafor indicating use of the Affine Merge mode, wherein the generated listof motion information predictor candidates comprises: when the obtaineddata indicates use of the Affine Merge mode, Affine Merge mode predictorcandidates; and when the obtained data indicate use of the non-AffineMerge mode, non-Affine Merge mode predictor candidates.

Suitably, the method further comprises obtaining, from a bitstream, datafor determining a maximum number of motion information predictorcandidates includable in the generated list of motion informationpredictor candidates. Suitably, all bits except for a first bit of themotion information predictor index are bypass CABAC decoded. Suitably,the first bit is CABAC decoded. Suitably, decoding the motioninformation predictor index comprises parsing, from a bitstream, thesame syntax element when the Affine Merge mode is used and when thenon-Affine Merge mode is used. Suitably, a motion information predictorcandidate comprises information for obtaining a motion vector. Suitably,the generated list of motion information predictor candidates includesan ATMVP candidate. Suitably, the generated list of motion informationpredictor candidates has the same maximum number of motion informationpredictor candidates includable therein when the Affine Merge mode isused and when the non-Affine Merge mode is used.

According to a forty-third aspect of the present invention there isprovided a device for encoding a motion information predictor index,comprising: means for generating a list of motion information predictorcandidates; means for selecting, when an Affine Merge mode is used, oneof the motion information predictor candidates in the list as an AffineMerge mode predictor; means for selecting, when a non-Affine Merge modeis used, one of the motion information predictor candidates in the listas a non-Affine Merge mode predictor; and means for generating a motioninformation predictor index for the selected motion informationpredictor candidate using CABAC coding, one or more bits of the motioninformation predictor index being bypass CABAC coded. Suitably, thedevice comprises means for performing a method of encoding a motioninformation predictor index according to the forty-first aspect.

According to a forty-fourth aspect of the present invention there isprovided a device for decoding a motion information predictor index,comprising: means for generating a list of motion information predictorcandidates; means for decoding the motion information predictor indexusing CABAC decoding, one or more bits of the motion informationpredictor index being bypass CABAC decoded; means for, when an AffineMerge mode is used, using the decoded motion information predictor indexto identify one of the motion information predictor candidates in thelist as an Affine Merge mode predictor; and means for, when a non-AffineMerge mode is used, using the decoded motion information predictor indexto identify one of the motion information predictor candidates in thelist as a non-Affine Merge mode predictor. Suitably, the devicecomprises means for performing a method of decoding a motion informationpredictor index according to the forty-second aspect.

According to a forty-fifth aspect of the present invention there isprovided a method of encoding a motion information predictor index foran Affine Merge mode, comprising: generating a list of motioninformation predictor candidates; selecting one of the motioninformation predictor candidates in the list as an Affine Merge modepredictor; and generating a motion information predictor index for theselected motion information predictor candidate using CABAC coding, oneor more bits of the motion information predictor index being bypassCABAC coded.

Suitably, when a non-Affine Merge mode is used, the method furthercomprises selecting one of the motion information predictor candidatesin the list as a non-Affine Merge mode predictor. Suitably, the CABACcoding comprises, for at least one bit of the motion informationpredictor index of a current block, using a first context variable whenthe Affine Merge mode is used or using a second context variable whenthe non-Affine Merge mode is used; and the method further comprisesincluding data for indicating use of the Affine Merge mode in abitstream when the Affine Merge mode is used. Alternatively, the CABACcoding comprises using the same context variable for at least one bit ofthe motion information predictor index of a current block when theAffine Merge mode is used and when the non-Affine Merge mode is used.

Suitably, the method further comprises including data for determining amaximum number of motion information predictor candidates includable inthe generated list of motion information predictor candidates in abitstream.

Suitably, all bits except for a first bit of the motion informationpredictor index are bypass CABAC coded. Suitably, the first bit is CABACcoded. Suitably, the motion information predictor index for the selectedmotion information predictor candidate is encoded using the same syntaxelement when the Affine Merge mode is used and when the non-Affine Mergemode is used.

According to a forty-sixth aspect of the present invention there isprovided a method of decoding a motion information predictor index foran Affine Merge mode, comprising: generating a list of motioninformation predictor candidates; decoding the motion informationpredictor index using CABAC decoding, one or more bits of the motioninformation predictor index being bypass CABAC decoded; and when theAffine Merge mode is used, using the decoded motion informationpredictor index to identify one of the motion information predictorcandidates in the list as an Affine Merge mode predictor.

Suitably, when a non-Affine Merge mode is used, the method furthercomprises using the decoded motion information predictor index toidentify one of the motion information predictor candidates in the listas a non-Affine Merge mode predictor. Suitably, the method furthercomprises: obtaining, from a bitstream, data for indicating use of theAffine Merge mode, and the CABAC decoding comprises, for at least onebit of the motion information predictor index of a current block: whenthe obtained data indicates use of the Affine Merge mode, using a firstcontext variable; and when the obtained data indicates use of thenon-Affine Merge mode, using a second context variable. Alternatively,the CABAC decoding comprises using the same context variable for atleast one bit of the motion information predictor index of a currentblock when the Affine Merge mode is used and when the non-Affine Mergemode is used.

Suitably, the method further comprises obtaining, from a bitstream, datafor indicating use of the Affine Merge mode, wherein the generated listof motion information predictor candidates comprises: when the obtaineddata indicates use of the Affine Merge mode, Affine Merge mode predictorcandidates; and when the obtained data indicate use of the non-AffineMerge mode, non-Affine Merge mode predictor candidates.

Suitably, decoding the motion information predictor index comprisesparsing, from a bitstream, the same syntax element when the Affine Mergemode is used and when the non-Affine Merge mode is used. Suitably, themethod further comprises obtaining, from a bitstream, data fordetermining a maximum number of motion information predictor candidatesincludable in the generated list of motion information predictorcandidates. Suitably, all bits except for a first bit of the motioninformation predictor index are bypass CABAC decoded. Suitably, thefirst bit is CABAC decoded. Suitably, a motion information predictorcandidate comprises information for obtaining a motion vector. Suitably,the generated list of motion information predictor candidates includesan ATMVP candidate. Suitably, the generated list of motion informationpredictor candidates has the same maximum number of motion informationpredictor candidates includable therein when the Affine Merge mode isused and when a non-Affine Merge mode is used.

According to a forty-seventh aspect of the present invention there isprovided a device for encoding a motion information predictor index foran Affine Merge mode, comprising: means for generating a list of motioninformation predictor candidates; means for selecting one of the motioninformation predictor candidates in the list as an Affine Merge modepredictor; and means for generating a motion information predictor indexfor the selected motion information predictor candidate using CABACcoding, one or more bits of the motion information predictor index beingbypass CABAC coded. Suitably, the device comprises means for performinga method of encoding a motion information predictor index according tothe forty-fifth aspect.

According to a forty-eighth aspect of the present invention there isprovided a device for decoding a motion information predictor index foran Affine Merge mode, comprising: means for generating a list of motioninformation predictor candidates; means for decoding the motioninformation predictor index using CABAC decoding, one or more bits ofthe motion information predictor index being bypass CABAC decoded; andmeans for, when the Affine Merge mode is used, using the decoded motioninformation predictor index to identify one of the motion informationpredictor candidates in the list as an Affine Merge mode predictor.Suitably, the device comprises means for performing a method of decodinga motion information predictor index according to the forty-sixthaspect.

In one embodiment the camera is adapted to indicate when said zoomingmeans is operational and signal affine mode in dependence on saidindication that the zooming means is operational.

In another embodiment the camera further comprises panning means.

In another embodiment the camera is adapted to indicate when saidpanning means is operational and signal affine mode in dependence onsaid indication that the panning means is operational.

According to yet another aspect of the present invention there isprovided a mobile device comprising a camera embodying any of the cameraaspects above.

In one embodiment the mobile device further comprises at least onepositional sensor adapted to sense a change in orientation of the mobiledevice.

In one embodiment the mobile device is adapted to signal affine mode independence on said sensing a change in orientation of the mobile device.

Further features of the invention are characterised by the otherindependent and dependent claims.

Any feature in one aspect of the invention may be applied to otheraspects of the invention, in any appropriate combination. In particular,method aspects may be applied to apparatus aspects, and vice versa.

Furthermore, features implemented in hardware may be implemented insoftware, and vice versa. Any reference to software and hardwarefeatures herein should be construed accordingly.

Any apparatus feature as described herein may also be provided as amethod feature, and vice versa. As used herein, means plus functionfeatures may be expressed alternatively in terms of their correspondingstructure, such as a suitably programmed processor and associatedmemory.

It should also be appreciated that particular combinations of thevarious features described and defined in any aspects of the inventioncan be implemented and/or supplied and/or used independently.

Reference will now be made, by way of example, to the accompanyingdrawings, in which:

FIG. 1 is a diagram for use in explaining a coding structure used inHEVC;

FIG. 2 is a block diagram schematically illustrating a datacommunication system in which one or more embodiments of the inventionmay be implemented;

FIG. 3 is a block diagram illustrating components of a processing devicein which one or more embodiments of the invention may be implemented;

FIG. 4 is a flow chart illustrating steps of an encoding methodaccording to embodiments of the invention;

FIG. 5 is a flow chart illustrating steps of a decoding method accordingto embodiments of the invention;

FIGS. 6(a) and 6(b) illustrate spatial and temporal blocks that can beused to generate motion vector predictors;

FIG. 7 shows simplified steps of the process of an AMVP predictor setderivation;

FIG. 8 is a schematic of a motion vector derivation process of the Mergemodes;

FIG. 9 illustrates segmentation of a current block and temporal motionvector prediction;

FIG. 10(a) illustrates the coding of the Merge index for HEVC, or whenATMVP is not enabled at SPS level;

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled at SPS level;

FIG. 11(a) illustrates a simple affine motion field;

FIG. 11(b) illustrates a more complex affine motion field;

FIG. 12 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode;

FIG. 13 is a flow chart illustrating Merge candidates derivation;

FIG. 14 is a flow chart illustrating a first embodiment of theinvention;

FIG. 15 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode in a twelfth embodiment of theinvention;

FIG. 16 is a flow chart illustrating generating a list of mergecandidates in the twelfth embodiment of the invention;

FIG. 17 is a block diagram for use in explaining a CABAC encodersuitable for use in embodiments of the invention;

FIG. 18 is a schematic block diagram of a communication system forimplementation of one or more embodiments of the invention;

FIG. 19 is a schematic block diagram of a computing device;

FIG. 20 is a diagram illustrating a network camera system;

FIG. 21 is a diagram illustrating a smart phone;

FIG. 22 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode according to a sixteenth embodiment;

FIG. 23 is a flow chart illustrating use of a single index signallingscheme for both a merge mode and an Affine Merge mode; and

FIG. 24 is a flow chart illustrating Affine Merge candidate derivationprocess for the Affine Merge mode.

DETAILED DESCRIPTION

Embodiments of the present invention described below relate to improvingencoding and decoding of indexes using CABAC. It is understood thataccording to alternative embodiments of the present invention, animplementation for improving other context based arithmetic codingscheme functionally similar to the CABAC is also possible. Beforedescribing the embodiments, video encoding and decoding techniques andrelated encoders and decoders will be described.

FIG. 1 relates to a coding structure used in the High Efficiency VideoCoding (HEVC) video standard. A video sequence 1 is made up of asuccession of digital images i. Each such digital image is representedby one or more matrices. The matrix coefficients represent pixels.

An image 2 of the sequence may be divided into slices 3. A slice may insome instances constitute an entire image. These slices are divided intonon-overlapping Coding Tree Units (CTUs). A Coding Tree Unit (CTU) isthe basic processing unit of the High Efficiency Video Coding (HEVC)video standard and conceptually corresponds in structure to macroblockunits that were used in several previous video standards. A CTU is alsosometimes referred to as a Largest Coding Unit (LCU). A CTU has luma andchroma component parts, each of which component parts is called a CodingTree Block (CTB). These different color components are not shown in FIG.1 .

A CTU is generally of size 64 pixels×64 pixels for HEVC, yet for VVCthis size can be 128 pixels×128 pixels. Each CTU may in turn beiteratively divided into smaller variable-size Coding Units (CUs) 5using a quadtree decomposition.

Coding units are the elementary coding elements and are constituted bytwo kinds of sub-unit called a Prediction Unit (PU) and a Transform Unit(TU). The maximum size of a PU or TU is equal to the CU size. APrediction Unit corresponds to the partition of the CU for prediction ofpixels values. Various different partitions of a CU into PUs arepossible as shown by 6 including a partition into 4 square PUs and twodifferent partitions into 2 rectangular PUs. A Transform Unit is anelementary unit that is subjected to spatial transformation using DCT. ACU can be partitioned into TUs based on a quadtree representation 7.

Each slice is embedded in one Network Abstraction Layer (NAL) unit. Inaddition, the coding parameters of the video sequence are stored indedicated NAL units called parameter sets. In HEVC and H.264/AVC twokinds of parameter sets NAL units are employed: first, a SequenceParameter Set (SPS) NAL unit that gathers all parameters that areunchanged during the whole video sequence. Typically, it handles thecoding profile, the size of the video frames and other parameters.Secondly, a Picture Parameter Set (PPS) NAL unit includes parametersthat may change from one image (or frame) to another of a sequence. HEVCalso includes a Video Parameter Set (VPS) NAL unit which containsparameters describing the overall structure of the bitstream. The VPS isa new type of parameter set defined in HEVC, and applies to all of thelayers of a bitstream. A layer may contain multiple temporal sub-layers,and all version 1 bitstreams are restricted to a single layer. HEVC hascertain layered extensions for scalability and multiview and these willenable multiple layers, with a backwards compatible version 1 baselayer.

FIG. 2 and FIG. 18 illustrate a (data) communication system in which oneor more embodiments of the invention may be implemented. The datacommunication system comprises a transmission device 191, e.g. a server201, which is operable to transmit data packets of a data stream (e.g. abitstream 101) to a receiving device 195, e.g. a client terminal 202,via a data communication network 200. The data communication network 200may be a Wide Area Network (WAN) or a Local Area Network (LAN). Such anetwork may be for example a wireless network (Wifi/802.11a or b or g),an Ethernet network, an Internet network or a mixed network composed ofseveral different networks. In a particular embodiment of the inventionthe data communication system may be a digital television broadcastsystem in which the server 201 sends the same data content to multipleclients.

The data stream 204 (or the bitstream 101) provided by the server 201may be composed of multimedia data representing video (e.g. a sequenceof images 151) and audio data. Audio and video data streams may, in someembodiments of the invention, be captured by the server 201 using amicrophone and a camera respectively. In some embodiments data streamsmay be stored on the server 201 or received by the server 201 fromanother data provider, or generated at the server 201. The server 201 isprovided with an encoder 150 for encoding video and audio streams inparticular to provide a compressed bitstream 101 for transmission thatis a more compact representation of the data presented as input to theencoder.

In order to obtain a better ratio of the quality of transmitted data toquantity of transmitted data, the compression of the video data may befor example in accordance with the HEVC format or H.264/AVC format orVVC format.

The client 202 receives the transmitted bitstream 101 and its decoder100 decodes the reconstructed bitstream to reproduce video images (e.g.a video signal 109) on a display device and the audio data by a loudspeaker.

Although a streaming scenario is considered in the example of FIG. 2 andFIG. 18 , it will be appreciated that in some embodiments of theinvention the data communication between an encoder and a decoder may beperformed using for example a media storage device such as an opticaldisc.

In one or more embodiments of the invention a video image is transmittedwith data representative of compensation offsets for application toreconstructed pixels of the image to provide filtered pixels in a finalimage.

FIG. 3 schematically illustrates a processing device 300 configured toimplement at least one embodiment of the present invention. Theprocessing device 300 may be a device such as a micro-computer, aworkstation or a light portable device. The device 300 comprises acommunication bus 313 connected to:

-   -   a central processing unit 311, such as a microprocessor, denoted        CPU;    -   a read only memory 307, denoted ROM, for storing computer        programs for implementing the invention;    -   a random access memory 312, denoted RAM, for storing the        executable code of the method of embodiments of the invention as        well as the registers adapted to record variables and parameters        necessary for implementing the method of encoding a sequence of        digital images and/or the method of decoding a bitstream        according to embodiments of the invention; and    -   a communication interface 302 connected to a communication        network 303 over which digital data to be processed are        transmitted or received.

Optionally, the apparatus 300 may also include the following components:

-   -   a data storage means 304 such as a hard disk, for storing        computer programs for implementing methods of one or more        embodiments of the invention and data used or produced during        the implementation of one or more embodiments of the invention;    -   a disk drive 305 for a disk 306, the disk drive being adapted to        read data from the disk 306 or to write data onto said disk; and    -   a screen 309 for displaying data and/or serving as a graphical        interface with the user, by means of a keyboard 310 or any other        pointing means.

The apparatus 300 can be connected to various peripherals, such as forexample a digital camera 320 or a microphone 308, each being connectedto an input/output card (not shown) so as to supply multimedia data tothe apparatus 300.

The communication bus 313 provides communication and interoperabilitybetween the various elements included in the apparatus 300 or connectedto it. The representation of the bus is not limiting and in particularthe central processing unit is operable to communicate instructions toany element of the apparatus 300 directly or by means of another elementof the apparatus 300.

The disk 306 can be replaced by any information medium such as forexample a compact disk (CD-ROM), rewritable or not, a ZIP disk or amemory card and, in general terms, by an information storage means thatcan be read by a microcomputer or by a microprocessor, integrated or notinto the apparatus, possibly removable and adapted to store one or moreprograms whose execution enables the method of encoding a sequence ofdigital images and/or the method of decoding a bitstream according tothe invention to be implemented.

The executable code may be stored either in read only memory 307, on thehard disk 304 or on a removable digital medium such as for example adisk 306 as described previously. According to a variant, the executablecode of the programs can be received by means of the communicationnetwork 303, via the interface 302, in order to be stored in one of thestorage means of the apparatus 300 before being executed, such as thehard disk 304.

The central processing unit 311 is adapted to control and direct theexecution of the instructions or portions of software code of theprogram or programs according to the invention, instructions that arestored in one of the aforementioned storage means. On powering up, theprogram or programs that are stored in a non-volatile memory, forexample on the hard disk 304 or in the read only memory 307, aretransferred into the random access memory 312, which then contains theexecutable code of the program or programs, as well as registers forstoring the variables and parameters necessary for implementing theinvention.

In this embodiment, the apparatus is a programmable apparatus which usessoftware to implement the invention. However, alternatively, the presentinvention may be implemented in hardware (for example, in the form of anApplication Specific Integrated Circuit or ASIC).

FIG. 4 illustrates a block diagram of an encoder according to at leastone embodiment of the invention. The encoder is represented by connectedmodules, each module being adapted to implement, for example in the formof programming instructions to be executed by the CPU 311 of device 300,at least one corresponding step of a method implementing at least oneembodiment of encoding an image of a sequence of images according to oneor more embodiments of the invention.

An original sequence of digital images i0 to in 401 is received as aninput by the encoder 400. Each digital image is represented by a set ofsamples, sometimes also referred to as pixels (hereinafter, they arereferred to as pixels).

A bitstream 410 is output by the encoder 400 after implementation of theencoding process. The bitstream 410 comprises a plurality of encodingunits or slices, each slice comprising a slice header for transmittingencoding values of encoding parameters used to encode the slice and aslice body, comprising encoded video data.

The input digital images i0 to in 401 are divided into blocks of pixelsby module 402. The blocks correspond to image portions and may be ofvariable sizes (e.g. 4×4, 8×8, 16×16, 32×32, 64×64, 128×128 pixels andseveral rectangular block sizes can be also considered). A coding modeis selected for each input block. Two families of coding modes areprovided: coding modes based on spatial prediction coding (Intraprediction), and coding modes based on temporal prediction (Intercoding, Merge, SKIP). The possible coding modes are tested.

Module 403 implements an Intra prediction process, in which the givenblock to be encoded is predicted by a predictor computed from pixels ofthe neighborhood of said block to be encoded. An indication of theselected Intra predictor and the difference between the given block andits predictor is encoded to provide a residual if the Intra coding isselected.

Temporal prediction is implemented by motion estimation module 404 andmotion compensation module 405. Firstly a reference image from among aset of reference images 416 is selected, and a portion of the referenceimage, also called reference area or image portion, which is the closestarea (closest in terms of pixel value similarity) to the given block tobe encoded, is selected by the motion estimation module 404. Motioncompensation module 405 then predicts the block to be encoded using theselected area. The difference between the selected reference area andthe given block, also called a residual block, is computed by the motioncompensation module 405. The selected reference area is indicated usinga motion vector.

Thus, in both cases (spatial and temporal prediction), a residual iscomputed by subtracting the predictor from the original block.

In the INTRA prediction implemented by module 403, a predictiondirection is encoded. In the Inter prediction implemented by modules404, 405, 416, 418, 417, at least one motion vector or data foridentifying such motion vector is encoded for the temporal prediction.

Information relevant to the motion vector and the residual block isencoded if the Inter prediction is selected. To further reduce thebitrate, assuming that motion is homogeneous, the motion vector isencoded by difference with respect to a motion vector predictor. Motionvector predictors from a set of motion information predictor candidatesis obtained from the motion vectors field 418 by a motion vectorprediction and coding module 417.

The encoder 400 further comprises a selection module 406 for selectionof the coding mode by applying an encoding cost criterion, such as arate-distortion criterion. In order to further reduce redundancies atransform (such as DCT) is applied by transform module 407 to theresidual block, the transformed data obtained is then quantized byquantization module 408 and entropy encoded by entropy encoding module409. Finally, the encoded residual block of the current block beingencoded is inserted into the bitstream 410.

The encoder 400 also performs decoding of the encoded image in order toproduce a reference image (e.g. those in Reference images/pictures 416)for the motion estimation of the subsequent images. This enables theencoder and the decoder receiving the bitstream to have the samereference frames (reconstructed images or image portions are used). Theinverse quantization (“dequantization”) module 411 performs inversequantization (“dequantization”) of the quantized data, followed by aninverse transform by inverse transform module 412. The intra predictionmodule 413 uses the prediction information to determine which predictorto use for a given block and the motion compensation module 414 actuallyadds the residual obtained by module 412 to the reference area obtainedfrom the set of reference images 416.

Post filtering is then applied by module 415 to filter the reconstructedframe (image or image portions) of pixels. In the embodiments of theinvention an SAO loop filter is used in which compensation offsets areadded to the pixel values of the reconstructed pixels of thereconstructed image. It is understood that post filtering does notalways have to be performed. Also, any other type of post filtering mayalso be performed in addition to, or instead of, the SAO loop filtering.

FIG. 5 illustrates a block diagram of a decoder 60 which may be used toreceive data from an encoder according an embodiment of the invention.The decoder is represented by connected modules, each module beingadapted to implement, for example in the form of programminginstructions to be executed by the CPU 311 of device 300, acorresponding step of a method implemented by the decoder 60.

The decoder 60 receives a bitstream 61 comprising encoded units (e.g.data corresponding to a block or a coding unit), each one being composedof a header containing information on encoding parameters and a bodycontaining the encoded video data. As explained with respect to FIG. 4 ,the encoded video data is entropy encoded, and the motion vectorpredictors' indexes are encoded, for a given block, on a predeterminednumber of bits. The received encoded video data is entropy decoded bymodule 62. The residual data are then dequantized by module 63 and thenan inverse transform is applied by module 64 to obtain pixel values.

The mode data indicating the coding mode are also entropy decoded andbased on the mode, an INTRA type decoding or an INTER type decoding isperformed on the encoded blocks (units/sets/groups) of image data.

In the case of INTRA mode, an INTRA predictor is determined by intraprediction module 65 based on the intra prediction mode specified in thebitstream.

If the mode is INTER, the motion prediction information is extractedfrom the bitstream so as to find (identify) the reference area used bythe encoder. The motion prediction information comprises the referenceframe index and the motion vector residual. The motion vector predictoris added to the motion vector residual by motion vector decoding module70 in order to obtain the motion vector.

Motion vector decoding module 70 applies motion vector decoding for eachcurrent block encoded by motion prediction. Once an index of the motionvector predictor for the current block has been obtained, the actualvalue of the motion vector associated with the current block can bedecoded and used to apply motion compensation by module 66. Thereference image portion indicated by the decoded motion vector isextracted from a reference image 68 to apply the motion compensation 66.The motion vector(s) field data 71 is updated with the decoded motionvector in order to be used for the prediction of subsequent decodedmotion vectors.

Finally, a decoded block is obtained. Where appropriate, post filteringis applied by post filtering module 67. A decoded video signal 69 isfinally obtained and provided by the decoder 60.

CABAC

HEVC uses several types of entropy coding like the Context basedAdaptive Binary Arithmetic Coding (CABAC), Golomb-rice Code, or simplebinary representation called Fixed Length Coding. Most of the time, abinary encoding process is performed to represent different syntaxelements. This binary encoding process is also very specific and dependson the different syntax elements. An arithmetic coding represents thesyntax element according to their current probabilities. CABAC is anextension of the arithmetic coding which separates the probabilities ofa syntax element depending on a ‘context’ defined by a context variable.This corresponds to a conditional probability. The context variable maybe derived from the value of the current syntax for the top left block(A2 in FIG. 6 b as described in more detail below) and the above leftblock (B3 in FIG. 6 b ), which are already decoded.

CABAC has been adopted as a normative part of the H.264/AVC andH.265/HEVC standards. In H.264/AVC, it is one of two alternative methodsof entropy coding. The other method specified in H.264/AVC is alow-complexity entropy-coding technique based on the usage ofcontext-adaptively switched sets of variable-length codes, so-calledContext-Adaptive Variable-Length Coding (CAVLC). Compared to CABAC,CAVLC offers reduced implementation costs at the price of lowercompression efficiency. For TV signals in standard- or high-definitionresolution, CABAC typically provides bit-rate savings of 10-20% relativeto CAVLC at the same objective video quality. In HEVC, CABAC is one ofthe entropy coding method used. Many bits are also bypass CABAC coded.Moreover, some syntax elements are coded with unary codes or Golombcodes, which are other types of entropy codes.

FIG. 17 shows the main blocks of a CABAC encoder.

An input syntax element that is non-binary valued is binarized by abinarizer 1701. The coding strategy of CABAC is based on the findingthat a very efficient coding of syntax-element values in a hybridblock-based video coder, like components of motion vector differences ortransform-coefficient level values, can be achieved by employing abinarization scheme as a kind of preprocessing unit for the subsequentstages of context modeling and binary arithmetic coding. In general, abinarization scheme defines a unique mapping of syntax element values tosequences of binary decisions, so-called bins, which can also beinterpreted in terms of a binary code tree. The design of binarizationschemes in CABAC is based on a few elementary prototypes whose structureenables simple online calculation and which are adapted to some suitablemodel-probability distributions.

Each bin can be processed in one of two basic ways according to thesetting of a switch 1702. When the switch is in the “regular” setting,the bin is supplied to a context modeler 1703 and a regular codingengine 1704. When the switch is in the “bypass” setting, the contextmodeler is bypassed and the bin is supplied to a bypass coding engine1705. Another switch 1706 has “regular” and “bypass” settings similar tothe switch 1702 so that the bins coded by the applicable one of thecoding engines 1704 and 1705 can form a bitstream as the output of theCABAC encoder.

It is understood that the other switch 1706 may be used with a storageto group some of the bins (e.g. the bins for encoding a block or acoding unit) coded by the coding engine 1705 to provide a block ofbypass coded data in the bitstream, and to group some of the bins (e.g.the bins for encoding a block or a coding unit) coded by the codingengine 1704 to provide another block of “regular” (or arithmetically)coded data in the bitstream. This separate grouping of bypass coded andregular coded data can lead to improved throughput during the decodingprocess.

By decomposing each syntax element value into a sequence of bins,further processing of each bin value in CABAC depends on the associatedcoding-mode decision, which can be either chosen as the regular or thebypass mode. The latter is chosen for bins related to the signinformation or for lower significant bins, which are assumed to beuniformly distributed and for which, consequently, the whole regularbinary arithmetic encoding process is simply bypassed. In the regularcoding mode, each bin value is encoded by using the regular binaryarithmetic-coding engine, where the associated probability model iseither determined by a fixed choice, without any context modeling, oradaptively chosen depending on the related context model. As animportant design decision, the latter case is generally applied to themost frequently observed bins only, whereas the other, usually lessfrequently observed bins, will be treated using a joint, typicallyzero-order probability model. In this way, CABAC enables selectivecontext modeling on a sub-symbol level, and hence, provides an efficientinstrument for exploiting inter-symbol redundancies at significantlyreduced overall modeling or learning costs. For the specific choice ofcontext models, four basic design types are employed in CABAC, where twoof them are applied to coding of transform-coefficient levels only. Thedesign of these four prototypes is based on a priori knowledge about thetypical characteristics of the source data to be modeled and it reflectsthe aim to find a good compromise between the conflicting objectives ofavoiding unnecessary modeling-cost overhead and exploiting thestatistical dependencies to a large extent.

On the lowest level of processing in CABAC, each bin value enters thebinary arithmetic encoder, either in regular or bypass coding mode. Forthe latter, a fast branch of the coding engine with a considerablyreduced complexity is used while for the former coding mode, encoding ofthe given bin value depends on the actual state of the associatedadaptive probability model that is passed along with the bin value tothe M coder—a term that has been chosen for the table-based adaptivebinary arithmetic coding engine in CABAC.

Inter Coding

HEVC uses 3 different INTER modes: the Inter mode (Advanced MotionVector Prediction (AMVP)), the “classical” Merge mode (i.e. the“non-Affine Merge mode” or also known as “regular” Merge mode) and the“classical” Merge Skip mode (i.e. the “non-Affine Merge Skip” mode oralso known as “regular” Merge Skip mode). The main difference betweenthese modes is the data signalling in the bitstream. For the Motionvector coding, the current HEVC standard includes a competition basedscheme for Motion vector prediction which was not present in earlierversions of the standard. It means that several candidates are competingwith the rate distortion criterion at encoder side in order to find thebest motion vector predictor or the best motion information forrespectively the Inter or the Merge modes (i.e. the “classical/regular”Merge mode or the “classical/regular” Merge Skip mode). An indexcorresponding to the best predictors or the best candidate of the motioninformation is then inserted in the bitstream. The decoder can derivethe same set of predictors or candidates and uses the best one accordingto the decoded index. In the Screen Content Extension of HEVC, the newcoding tool called Intra Block Copy (IBC) is signalled as any of thosethree INTER modes, the difference between IBC and the equivalent INTERmode being made by checking whether the reference frame is the currentone. This can be implemented e.g. by checking the reference index of thelist L0, and deducing this is Intra Block Copy if this is the last framein that list. Another way to do is comparing the Picture Order Count ofcurrent and reference frames: if equal, this is Intra Block Copy.

The design of the derivation of predictors and candidates is importantin achieving the best coding efficiency without a disproportionateimpact on complexity. In HEVC two motion vector derivations are used:one for Inter mode (Advanced Motion Vector Prediction (AMVP)) and onefor Merge modes (Merge derivation process—for the classical Merge modeand the classical Merge Skip mode). The following describes theseprocesses.

FIGS. 6 a and 6 b illustrates spatial and temporal blocks that can beused to generate motion vector predictors in Advanced Motion VectorPrediction (AMVP) and Merge modes of HEVC coding and decoding systemsand FIG. 7 shows simplified steps of the process of the AMVP predictorset derivation.

Two spatial predictors, i.e. the two spatial motion vectors for the AMVPmode, are chosen among motion vectors of the top blocks (indicated byletter ‘B’) and the left blocks (indicated by letter ‘A’) including thetop corner blocks (block B2) and left corner block (block A0), and onetemporal predictor is chosen among motion vectors of the bottom rightblock (H) and centre block (Center) of the collocated block asrepresented in FIG. 6 a.

Table 1 below outlines the nomenclature used when referring to blocks inrelative terms to the current block as shown in FIGS. 6 a and 6 b . Thisnomenclature is used as shorthand but it should be appreciated othersystems of labelling may be used, in particular in future versions of astandard.

TABLE 1 Block label Relative positional description of neighbouringblock A0 ‘Below left’ or ‘left corner’-diagonally down and to the leftof the current block A1 ‘left’ or ‘Bottom left’-left of the bottom ofthe current block A2 ‘Top left’-left of the top of the current block B0‘Above right’-diagonally up and to the right of the current block B1‘Above’-above the top right of the current block B2 ‘Above left’ or ‘Topcorner’-diagonally up and to the left of the current block B3 ‘Up’-abovethe top left of the current block H Bottom right of a collocated blockin a reference frame Center A block within a collocated block in areference frame

It should be noted that the ‘current block’ may be variable in size, forexample 4×4, 16×16, 32×32, 64×64, 128×128 or any size in between. Thedimensions of a block are preferably factors of 2 (i.e. 2{circumflexover ( )}n×2{circumflex over ( )}m where n and m are positive integers)as this results in a more efficient use of bits when using binaryencoding. The current block need not be square, although this is often apreferable embodiment for coding complexity.

Turning to FIG. 7 , a first step aims at selecting a first spatialpredictor (Cand 1, 706) among the bottom left blocks A0 and A1, thatspatial positions are illustrated in FIG. 6 a . To that end, theseblocks are selected (700, 702) one after another, in the given order,and, for each selected block, following conditions are evaluated (704)in the given order, the first block for which conditions are fulfilledbeing set as a predictor:

-   -   the motion vector from the same reference list and the same        reference image;    -   the motion vector from the other reference list and the same        reference image;    -   the scaled motion vector from the same reference list and a        different reference image; or    -   the scaled motion vector from the other reference list and a        different reference image.

If no value is found, the left predictor is considered as beingunavailable. In this case, it indicates that the related blocks wereINTRA coded or those blocks do not exist.

A following step aims at selecting a second spatial predictor (Cand 2,716) among the above right block B0, above block B1, and above leftblock B2, that spatial positions are illustrated in FIG. 6 a . To thatend, these blocks are selected (708, 710, 712) one after another, in thegiven order, and, for each selected block, the above mentionedconditions are evaluated (714) in the given order, the first block forwhich the above mentioned conditions are fulfilled being set as apredictor.

Again, if no value is found, the top predictor is considered as beingunavailable. In this case, it indicates that the related blocks wereINTRA coded or those blocks do not exist.

In a next step (718), the two predictors, if both are available, arecompared one to the other to remove one of them if they are equal (i.e.same motion vector values, same reference list, same reference index andthe same direction type). If only one spatial predictor is available,the algorithm is looking for a temporal predictor in a following step.

The temporal motion predictor (Cand 3, 726) is derived as follows: thebottom right (H, 720) position of the collocated block in aprevious/reference frame is first considered in the availability checkmodule 722. If it does not exist or if the motion vector predictor isnot available, the centre of the collocated block (Centre, 724) isselected to be checked. These temporal positions (Centre and H) aredepicted in FIG. 6 a . In any case, scaling 723 is applied on thosecandidates to match the temporal distance between current frame and thefirst frame in the reference list.

The motion predictor value is then added to the set of predictors. Next,the number of predictors (Nb_Cand) is compared (728) to the maximumnumber of predictors (Max_Cand). As mentioned above, the maximum numberof predictors (Max_Cand) of motion vector predictors that the derivationprocess of AMVP needs to generate is two in the current version of HEVCstandard.

If this maximum number is reached, the final list or set of AMVPpredictors (732) is built. Otherwise, a zero predictor is added (730) tothe list. The zero predictor is a motion vector equal to (0, 0).

As illustrated in FIG. 7 , the final list or set of AMVP predictors(732) is built from a subset of spatial motion predictor candidates (700to 712) and from a subset of temporal motion predictor candidates (720,724).

As mentioned above, a motion predictor candidate of the classical Mergemode or of the classical Merge Skip mode represents all the requiredmotion information: direction, list, reference frame index, and motionvectors. An indexed list of several candidates is generated by the Mergederivation process. In the current HEVC design the maximum number ofcandidates for both Merge modes (i.e. the classical Merge mode and theclassical Merge Skip mode) is equal to five (4 spatial candidates and 1temporal candidate).

FIG. 8 is a schematic of a motion vector derivation process of the Mergemodes (the classical Merge mode and the classical Merge Skip mode). In afirst step of the derivation process, five block positions areconsidered (800 to 808). These positions are the spatial positionsdepicted in FIG. 6 a with references A1, B1, B0, A0, and B2. In afollowing step, the availability of the spatial motion vectors ischecked and at most five motion vectors are selected/obtained forconsideration (810). A predictor is considered as available if it existsand if the block is not INTRA coded. Therefore, selecting the motionvectors corresponding to the five blocks as candidates is done accordingto the following conditions:

if the “left” A1 motion vector (800) is available (810), i.e. if itexists and if this block is not INTRA coded, the motion vector of the“left” block is selected and used as a first candidate in list ofcandidate (814);

if the “above” B1 motion vector (802) is available (810), the candidate“above” block motion vector is compared to “left” A1 motion vector(812), if it exists. If B1 motion vector is equal to A1 motion vector,B1 is not added to the list of spatial candidates (814). On thecontrary, if B1 motion vector is not equal to A1 motion vector, B1 isadded to the list of spatial candidates (814);

if the “above right” B0 motion vector (804) is available (810), themotion vector of the “above right” is compared to B1 motion vector(812). If B0 motion vector is equal to B1 motion vector, B0 motionvector is not added to the list of spatial candidates (814). On thecontrary, if B0 motion vector is not equal to B1 motion vector, B0motion vector is added to the list of spatial candidates (814);

if the “below left” A0 motion vector (806) is available (810), themotion vector of the “below left” is compared to A1 motion vector (812).If A0 motion vector is equal to A1 motion vector, A0 motion vector isnot added to the list of spatial candidates (814). On the contrary, ifA0 motion vector is not equal to A1 motion vector, A0 motion vector isadded to the list of spatial candidates (814); and

if the list of spatial candidates doesn't contain four candidates, theavailability of “above left” B2 motion vector (808) is checked (810). Ifit is available, it is compared to A1 motion vector and to B1 motionvector. If B2 motion vector is equal to A1 motion vector or to B1 motionvector, B2 motion vector is not added to the list of spatial candidates(814). On the contrary, if B2 motion vector is not equal to A1 motionvector or to B1 motion vector, B2 motion vector is added to the list ofspatial candidates (814).

At the end of this stage, the list of spatial candidates comprises up tofour candidates.

For the temporal candidate, two positions can be used: the bottom rightposition of the collocated block (816, denoted H in FIG. 6 a ) and thecentre of the collocated block (818). These positions are depicted inFIG. 6 a.

As described in relation to FIG. 7 for the temporal motion predictor ofthe AMVP motion vector derivation process, a first step aims at checking(820) the availability of the block at the H position. Next, if it isnot available, the availability of the block at the centre position ischecked (820). If at least one motion vector of these positions isavailable, the temporal motion vector can be scaled (822), if needed, tothe reference frame having index 0, for both list L0 and L1, in order tocreate a temporal candidate (824) which is added to the list of Mergemotion vector predictor candidates. It is positioned after the spatialcandidates in the list. The lists L0 and L1 are 2 reference frame listscontaining zero, one or more reference frames.

If the number (Nb_Cand) of candidates is strictly less (826) than themaximum number of candidates (Max_Cand that value is signalled in thebit-stream slice header and is equal to five in the current HEVC design)and if the current frame is of the B type, combined candidates aregenerated (828). Combined candidates are generated based on availablecandidates of the list of Merge motion vector predictor candidates. Itmainly consists in combining (pairing) the motion information of onecandidate of the list L0 with the motion information of one candidate oflist L1.

If the number (Nb_Cand) of candidates remains strictly less (830) thanthe maximum number of candidates (Max_Cand), zero motion candidates aregenerated (832) until the number of candidates of the list of Mergemotion vector predictor candidates reaches the maximum number ofcandidates.

At the end of this process, the list or set of Merge motion vectorpredictor candidates (i.e. a list or set of candidates for the Mergemodes, which are the classical Merge mode and the classical Merge Skipmode) is built (834). As illustrated in FIG. 8 , the list or set ofMerge motion vector predictor candidates is built (834) from a subset ofspatial candidates (800 to 808) and from a subset of temporal candidates(816, 818).

Alternative Temporal Motion Vector Prediction (ATMVP)

The alternative temporal motion vector prediction (ATMVP) is a specialtype of motion compensation. Instead of considering only one motioninformation for the current block from a temporal reference frame, eachmotion information of each collocated block is considered. So thistemporal motion vector prediction gives a segmentation of the currentblock with the related motion information of each sub-block as depictedin FIG. 9 .

In the current VTM reference software, ATMVP is signalled as a Mergecandidate inserted in the list of Merge candidates (i.e. a list or setof candidates for the Merge modes, which are the classical Merge modeand the classical Merge Skip mode). When ATMVP is enabled at SPS level,the maximum number of Merge candidates is increased by one. So 6candidates are considered instead of 5, which would have been the caseif this ATMVP mode is disabled.

In addition when this prediction is enabled at SPS level, all bins ofMerge index (i.e. an identifier or an index for identifying a candidatefrom the list of Merge candidates) are context coded by CABAC. While inHEVC, or when ATMVP is not enabled at SPS level in JEM, only the firstbin is context coded and the remaining bins are context by-pass coded(i.e. bypass CABAC coded). FIG. 10(a) illustrates the coding of theMerge index for HEVC, or when ATMVP is not enabled at SPS level in JEM.This corresponds to a unary max coding. In addition the first bit isCABAC coded and the other bits are bypass CABAC coded.

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled at SPS level. In addition all bits are CABAC coded (from the1^(st) to the 5^(th) bit). It should be noted that each bit for codingthe index has its own context—in other words their probabilities areseparated.

Affine Mode

In HEVC, only translation motion model is applied for motioncompensation prediction (MCP). While in the real world, there are manykinds of motion, e.g. zoom in/out, rotation, perspective motions andother irregular motions.

In the JEM, a simplified affine transform motion compensation predictionis applied and the general principle of Affine mode is described belowbased on an extract of document JVET-G1001 presented at a JVET meetingin Torino at 13-21 Jul. 2017. This entire document is herebyincorporated by reference insofar as it describes other algorithms usedin JEM.

As shown in FIG. 11(a), the affine motion field of the block isdescribed by two control point motion vectors.

The motion vector field (MVF) of a block is described by the followingequation:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{1x} - v_{0x}} \right)}{w}x} - {\frac{\left( {v_{1y} - v_{0y}} \right)}{w}y} + v_{0x}}} \\{v_{y} = {{\frac{\left( {v_{1y} - v_{0y}} \right)}{w}x} + {\frac{\left( {v_{1x} - v_{0x}} \right)}{w}y} + v_{0y}}}\end{matrix} \right. & (1)\end{matrix}$

Where (v_(0x), v_(0y)) is motion vector of the top-left corner controlpoint, and (v_(1x), v_(1y)) is motion vector of the top-right cornercontrol point. And w is the width of the block Cur (current block).

In order to further simplify the motion compensation prediction,sub-block based affine transform prediction is applied. The sub-blocksize M×N is derived as in Equation 2, where MvPre is the motion vectorfraction accuracy ( 1/16 in JEM), (v_(2x), v_(2y)) is motion vector ofthe top-left control point, calculated according to Equation 1.

$\begin{matrix}\left\{ \begin{matrix}{M = {{clip}\mspace{14mu} 3\ \left( {4,w,\frac{w \times {MvPre}}{\max\left( {{{abs}\left( {v_{1x} - v_{0x}} \right)},{{abs}\left( {v_{1y} - v_{0y}} \right)}} \right)}} \right)}} \\{N = {{clip}\mspace{14mu} 3\ \left( {4,h,\frac{h \times {MvPre}}{\max\left( {{{abs}\left( {v_{2x} - v_{0x}} \right)},{{abs}\left( {v_{2y} - v_{0y}} \right)}} \right)}} \right)}}\end{matrix} \right. & (2)\end{matrix}$

After derived by Equation 2, M and N may be adjusted downward ifnecessary to make it a divisor of w and h, respectively. h is the heightof the current block Cur (current block).

To derive motion vector of each M×N sub-block, the motion vector of thecenter sample of each sub-block, as shown in FIG. 6 a , is calculatedaccording to Equation 1, and rounded to 1/16 fraction accuracy. Thenmotion compensation interpolation filters are applied to generate theprediction of each sub-block with derived motion vector.

The affine mode is a motion compensation mode like the Inter modes(AMVP, “classical” Merge, or “classical” Merge Skip). Its principle isto generate one motion information per pixel according to 2 or 3neighbouring motion information. In the JEM, the affine mode derives onemotion information for each 4×4 block as depicted in FIG. 11(a)/(b)(each square is a 4×4 block, and the whole block in FIG. 11(a)/(b) is a16×16 block which is divided into 16 blocks of such square of 4×4size—each 4×4 square block having a motion vector associated therewith).It is understood that in embodiments of the present invention, theaffine mode may drive one motion information for a block of a differentsize or shape as long as the one motion information can be derived. Thismode is available for the AMVP mode and the Merge modes (i.e. theclassical Merge mode which is also referred to as “non-Affine Mergemode” and the classical Merge Skip mode which is also referred to as“non-Affine Merge Skip mode”), by enabling the affine mode with a flag.This flag is CABAC coded. In an embodiment, the context depends on thesum of affine flags of the left block (position A2 of FIG. 6 b ) and theabove left block (position B3 of FIG. 6 b ).

So three context variables (0, 1 or 2) are possible in the JEM for theaffine flag given by the following formula:Ctx=IsAffine(A2)+IsAffine(B3)

Where IsAffine(block) is a function which returns 0 if the block is notan affine block and 1 if the block is affine.

Affine Merge Candidate Derivation

In the JEM, the Affine Merge mode (or the Affine Merge Skip mode)derives motion information for the current block from the firstneighbouring block which is affine (i.e. the first neighbouring blockthat is coded using the affine mode) among blocks at positions A1, B1,B0, A0, B2. These positions are depicted in FIGS. 6 a and 6 b . However,how the affine parameter is derived is not completely defined, and thepresent invention aims to improve at least this aspect, for example bydefining affine parameters of the Affine Merge mode so that it enables awider selection choice for the Affine Merge candidates (i.e. not justthe first neighbouring block which is affine but at least one othercandidate is available for the selection with an identifier such as anindex).

For example, according to some embodiments of the present invention, anAffine Merge mode with its own list of Affine Merge candidates(candidates for deriving/obtaining motion information for the Affinemode) and an Affine Merge index (for identifying one Affine Mergecandidate from the list of Affine Merge candidates) is used to encode ordecode a block.

Affine Merge Signalling

FIG. 12 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode for signalling use of the AffineMerge mode. In this figure the Skip flag (1201), the prediction mode(1211), the Merge flag (1203) the Merge Index (1208) and the affine flag(1206) can be decoded.

For all CU in an Inter slice, the Skip flag is decoded (1201). If the CUis not Skip (1202), the pred mode (Prediction mode) is decoded (1211).This syntax element indicates if the current CU is encoded in (is to bedecoded in) an Inter or an Intra mode. Please note that if the CU isSkip (1202), its current mode is the Inter mode. If the CU is not skip(1202:No), the CU is coded in AMVP or in Merge mode. If the CU is Inter(1212), the Merge flag is decoded (1203). If the CU is Merge (1204) orif the CU is Skip (1202:Yes), it is verified/checked (1205) if theaffine flag (1206) needs to be decoded, i.e. at (1205) a determinationof whether the current CU could have been encoded in the affine mode ismade. This flag is decoded if the current CU is a 2N×2N CU, which meansin the current VVC that the height and the width of the CU shall beequal. Moreover, at least one neighbouring CU A1 or B1 or B0 or A0 or B2must be coded with the affine mode (in either Affine Merge mode or anAMVP mode with the affine mode enabled). Eventually the current CU shallnot be a 4×4 CU but by default the CU 4×4 are disabled in the VTMreference software. If this condition (1205) is false, it is sure thatthe current CU is coded with the classical Merge mode (or classicalMerge Skip mode) as specified in HEVC, and a Merge Index is decoded(1208). If the Affine Flag (1206) is set equal to 1 (1207), the CU is aMerge affine CU (i.e. a CU encoded in the Affine Merge mode) or a MergeSkip Affine CU (i.e. a CU encoded in the Affine Merge Skip mode) and theMerge index (1208) doesn't need to be decoded (because the Affine Mergemode is used, i.e. the CU is to be decoded using the affine mode withthe first neighbouring block that is affine). Otherwise, the current CUis a classical (basic) Merge or Merge Skip CU (i.e. a CU encoded in theclassical Merge or Merge Skip mode) and the Merge index candidate (1208)is decoded.

In this specification ‘signalling’ may refer to inserting into(providing/including in), or extracting/obtaining from, the bitstreamone or more syntax element representing the enabling or disabling of amode or other information.

Merge Candidates Derivation

FIG. 13 is a flow chart illustrating the Merge candidates (i.e.candidates for the classical Merge mode or the classical Merge Skipmode) derivation. This derivation has been built on top of the motionvector derivation process of the Merge modes (i.e. a Merge candidateList derivation of HEVC) represented in FIG. 8 . The main changescompared to HEVC are the addition of the ATMVP candidate (1319, 1321,1323), the full duplicate checks of candidates (1325) and a new order ofthe candidates. The ATMVP prediction is set as a special candidate as itrepresents several motion information of the current CU. The value ofthe first sub-block (top left) is compared to the temporal candidate andthe temporal candidate is not added in the list of Merge if they areequal (1320). The ATMVP candidate is not compared to other spatialcandidates. In contrast to the temporal candidate which is compared toeach spatial candidate already in the list (1325) and not added in theMerge candidate list if it is a duplicate candidate.

When a spatial candidate is added in the list it is compared to theother spatial candidates in the list (1312) which is not the case in thefinal version of HEVC.

In the current VTM version the list of merge candidates is set in thefollowing order as it has been determined to provide the best resultsover the coding test conditions:

A1

B1

B0

A0

ATMVP

B2

TEMPORAL

Combined

Zero MV

It is important to note that spatial candidate B2 is set after the ATMVPcandidate. In addition, when ATMVP is enabled at slice level the maximumnumber in the list of candidates is 6 instead of 5 of HEVC.

Exemplary embodiments of the invention will now be described withreference to FIGS. 12-16 and 22-24 . It should be noted that theembodiments may be combined unless explicitly stated otherwise; forexample certain combinations of embodiments may improve codingefficiency at increased complexity, but this may be acceptable incertain use cases.

First Embodiment

As noted above, in the current VTM reference software, ATMVP issignalled as a Merge candidate inserted in the list of Merge candidates.ATMVP can be enabled or disabled for a whole sequence (at SPS level).When ATMVP is disabled, the maximum number of Merge candidates is 5.When ATMVP is enabled, the maximum number of Merge candidates isincreased by one from 5 to 6.

In the encoder, the list of Merge candidates is generated using themethod of FIG. 13 . One Merge candidate is selected from the list ofMerge candidates, for example based on a rate-distortion criterion. Theselected Merge candidate is signalled to the decoder in the bitstreamusing a syntax element called the Merge index.

In the current VTM reference software, the manner of coding the Mergeindex is different depending on whether ATMVP is enabled or disabled.

FIG. 10(a) illustrates the coding of the Merge index when ATMVP is notenabled at SPS level. The 5 Merge candidates Cand0, Cand1, Cand2, Cand3and Cand4 are coded 0, 10, 110, 1110 and 1111 respectively. Thiscorresponds to a unary max coding. In addition, the first bit is codedby CABAC using a single context and the other bits are bypass coded.

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled. The 6 Merge candidates Cand0, Cand1, Cand2, Cand3, Cand4 andCand5 are coded 0, 10, 110, 1110, 11110 and 11111 respectively. In thiscase, all bits of the merge index (from the 1^(st) to the 5^(th) bit)are context coded by CABAC. Each bit has its own context and there areseparate probability models for the different bits.

In the first embodiment of the present invention, as shown in FIG. 14 ,when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level) the codingof the Merge index is modified so that only the first bit of the Mergeindex is coded by CABAC using a single context. The context is set inthe same manner as in the current VTM reference software when ATMVP isnot enabled at SPS level. The other bits (from the 2^(nd) to the 5^(th)bit) are bypass coded. When ATMVP is not included as a Merge candidatein the list of Merge candidates (for example, when ATMVP is disabled atSPS level) there are 5 Merge candidates. Only the first bit of the Mergeindex is coded by CABAC using a single context. The context is set inthe same manner as in the current VTM reference software when ATMVP isnot enabled at SPS level. The other bits (from the 2^(nd) to the 4^(th)bit) are bypass decoded.

The decoder generates the same list of Merge candidates as the encoder.This may be accomplished by using the method of FIG. 13 . When ATMVP isnot included as a Merge candidate in the list of Merge candidates (forexample, when ATMVP is disabled at SPS level) there are 5 Mergecandidates. Only the first bit of the Merge index is decoded by CABACusing a single context. The other bits (from the 2^(nd) to the 4^(th)bit) are bypass decoded. In contrast to the current reference software,when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level), only thefirst bit of the Merge index is decoded by CABAC using a single contextin the decoding of the Merge index. The other bits (from the 2^(nd) tothe 5^(th) bit) are bypass decoded. The decoded merge index is used toidentify the Merge candidate selected by the encoder from among the listof Merge candidates.

The advantage of this embodiment compared to the VTM2.0 referencesoftware is a complexity reduction of the merge index decoding anddecoder design (and encoder design) without impact on coding efficiency.Indeed, with this embodiment only 1 CABAC state is needed for the Mergeindex instead of 5 for the current VTM Merge index coding/decoding.Moreover, it reduces the worst-case complexity because the other bitsare CABAC bypass coded which reduces the number of operations comparedto coding all bits with CABAC.

Second Embodiment

In a second embodiment, all bits of the Merge index are CABAC coded butthey all share the same context. There may be a single context as in thefirst embodiment, which in this case is shared among the bits. As aresult, when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level), only onecontext is used, compared to 5 in the VTM2.0 reference software. Theadvantage of this embodiment compared to the VTM2.0 reference softwareis a complexity reduction of the merge index decoding and decoder design(and encoder design) without impact on coding efficiency.

Alternatively, as described below in connection with the third tofifteenth embodiments, a context variable may be shared among the bitsso that two or more contexts are available but the current context isshared by the bits.

When ATMVP is disabled the same context is still used for all bits.

This embodiment and all subsequent embodiments can be applied even ifATMVP is not an available mode or is disabled.

In a variant of the second embodiment, any two or more bits of the Mergeindex are CABAC coded and share the same context. Other bits of theMerge index are bypass coded. For example, the first N bits of the Mergeindex may be CABAC coded, where N is two or more.

Third Embodiment

In the first embodiment the first bit of the Merge index was CABAC codedusing a single context.

In the third embodiment, a context variable for a bit of the Merge indexdepends on the value of the Merge index of a neighbouring block. Thisallows more than one context for the target bit, with each contextcorresponding to a different value of the context variable.

The neighbouring block may be any block already decoded, so that itsMerge index is available to the decoder by the time the current block isbeing decoded. For example, the neighbouring block may be any of theblocks A0, A1, A2, B0, B1, B2 and B3 shown in FIG. 6 b.

In a first variant, just the first bit is CABAC coded using this contextvariable.

In a second variant, the first N bits of the Merge index, where N is twoor more, are CABAC coded and the context variable is shared among thoseN bits.

In a third variant, any N bits of the Merge index, where N is two ormore, are CABAC coded and the context variable is shared among those Nbits.

In a fourth variant, the first N bits of the Merge index, where N is twoor more, are CABAC coded and N context variables are used for those Nbits. Assuming the context variables have K values, K×N CABAC states areused. For example, in the present embodiment, with one neighbouringblock, the context variable may conveniently have 2 values, e.g. 0and 1. In other words 2N CABAC states are used.

In a fifth variant, any N bits of the Merge index, where N is two ormore, are adaptive-PM coded and N context variables are used for those Nbits.

The same variants are applicable to the fourth to sixteenth embodimentsdescribed hereinafter.

Fourth Embodiment

In the fourth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of two or moreneighbouring blocks. For example, a first neighbouring block may be aleft block A0, A1 or A2 and a second neighbouring block may be an upperblock B0, B1, B2 or B3. The manner of combining the two or more Mergeindex values is not particularly limited. Examples are given below.

The context variable may conveniently have 3 different values, e.g. 0, 1and 2, in this case as there are two neighbouring blocks. If the fourthvariant described in connection with the third embodiment is applied tothis embodiment with 3 different values, therefore, K is 3 instead of 2.In other words 3N CABAC states are used.

Fifth Embodiment

In the fifth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of theneighbouring blocks A2 and B3.

Sixth Embodiment

In the sixth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of theneighbouring blocks A1 and B1. The advantage of this variant isalignment with the Merge candidates derivation. As a result, in somedecoder and encoder implementations, memory access reductions can beachieved.

Seventh Embodiment

In the seventh embodiment, the context variable for a bit having bitposition idx_num in the Merge Index of the current block is obtainedaccording to the following formula:ctxIdx=(Merge_index_left==idx_num)+(Merge_index_up==idx_num)

where Merge_index_left is the Merge index for a left block,Merge_index_up is the Merge index for an upper block, and the symbol==isthe equality symbol.

When there are 6 Merge candidates, for example, 0<=idx_num<=5.

The left block may be the block A1 and the upper block may be the blockB1 (as in the sixth embodiment). Alternatively, the left block may bethe block A2 and the upper block may be the block B3 (as in the fifthembodiment).

The formula (Merge_index_left==idx_num) is equal to 1 if the Merge indexfor the left block is equal to idx_num. The following table gives theresults of this formula (Merge_index_left==idx_num):

idx_num Merge_index_ left 0 1 2 3 4 0 1 0 0 0 0 1 0 1 0 0 0 2 0 0 1 0 03 0 0 0 1 0 4 0 0 0 0 1 5 0 0 0 0 0

Of course the table of the formula (Merge_index_up==idx_num) is thesame.

The following table gives the unary max code of each Merge index valueand the relative bit position for each bit. This table corresponds toFIG. 10(b).

Unary max code Merge_index_left 0 1 2 3 4 0 0 1 1 0 2 1 1 0 3 1 1 1 0 41 1 1 1 0 5 1 1 1 1 1

If the left block is not a merge block or an affine merge block (i.e.coded using the Affine Merge mode) it is considered that the left blockis not available. The same condition is applied for the upper block.

For example, when only the first bit is CABAC coded, the contextvariable ctxIdx is set equal to:

0 if no left and up/upper block has a merge index or if the left blockMerge index is not the first index (i.e. not 0) and if the upper blockMerge index is not the first index (i.e. not 0);

1 if one but not the other of the left and upper blocks has its mergeindex equal to the first index; and

2 if for each of the left and upper blocks the merge index is equal tothe first index.

More generally, for a target bit at position idx_num which is CABACcoded, the context variable ctxIdx is set equal to:

0 if no left and up/upper block has a merge index or if the left blockMerge index is not the i^(th) index (where i=idx_num) and if the upperblock Merge index is not the i^(th) index;

1 if one but not the other of the left and upper blocks has its mergeindex equal to the the i^(th) index; and

2 if for each of the left and upper blocks the merge index is equal tothe i^(th) index. Here, the i^(th) index means the first index when i=0,the second index when i=1, and so on.

Eighth Embodiment

In the eighth embodiment, the context variable for a bit having bitposition idx_num in the Merge Index of the current block is obtainedaccording to the following formula:Ctx=(Merge_index_left>idx_num)+(Merge_index_up>idx_num) whereMerge_index_left is the Merge index for a left block, Merge_index_up isthe Merge index for an upper block, and the symbol>means “greater than”.

When there are 6 Merge candidates, for example, 0<=idx_num<=5.

The left block may be the block A1 and the upper block may be the blockB1 (as in the fifth embodiment). Alternatively, the left block may bethe block A2 and the upper block may be the block B3 (as in the sixthembodiment).

The formula (Merge_index_left>idx_num) is equal to 1 if the Merge indexfor the left block is greater than idx_num. If the left block is not amerge block or an affine merge block (i.e. coded using the Affine Mergemode) it is considered that the left block is not available. The samecondition is applied for the upper block.

The following table gives the results of this formula(Merge_index_left>idx_num):

idx_num Merge_index_left 0 1 2 3 4 0 0 0 0 0 0 1 1 0 0 0 0 2 1 1 0 0 0 31 1 1 0 0 4 1 1 1 1 0 5 1 1 1 1 1

For example, when only the first bit is CABAC coded, the contextvariable ctxIdx is set equal to:

0 if no left and up/upper block has a merge index or if the left blockMerge index is less than or equal to the first index (i.e. not 0) and ifthe upper block Merge index is less than or equal to the first index(i.e. not 0);

1 if one but not the other of the left and upper blocks has its mergeindex greater than the first index; and

2 if for each of the left and upper blocks the merge index is greaterthan the first index.

More generally, for a target bit at position idx_num which is CABACcoded, the context variable ctxIdx is set equal to:

0 if no left and up/upper block has a merge index or if the left blockMerge index is less than the i^(th) index (where i=idx_num) and if theupper block Merge index is less than or equal to the i^(th) index;

1 if one but not the other of the left and upper blocks has its mergeindex greater than the the i^(th) index; and

2 if for each of the left and upper blocks the merge index is greaterthan the i^(th) index.

The eighth embodiment provides a further coding efficiency increase overthe seventh embodiment.

Ninth Embodiment

In the fourth to eighth embodiments, the context variable for a bit ofthe Merge index of the current block depended on the respective valuesof the Merge index of two or more neighbouring blocks.

In the ninth embodiment, the context variable for a bit of the Mergeindex of the current block depends on the respective Merge flags of twoor more neighbouring blocks. For example, a first neighbouring block maybe a left block A0, A1 or A2 and a second neighbouring block may be anupper block B0, B1, B2 or B3.

The Merge flag is set to 1 when a block is encoded using the Merge mode,and is set to 0 when another mode such as Skip mode or Affine Merge modeis used. Note that in VMT2.0 Affine Merge is a distinct mode from thebasic or “classical” Merge mode. The Affine Merge mode may be signalledusing a dedicated Affine flag. Alternatively, the list of Mergecandidates may include an Affine Merge candidate, in which case theAffine Merge mode may be selected and signalled using the Merge index.

The context variable is then set to:

0 if neither the left nor the upper neighbouring block has its Mergeflag set to 1;

1 if one but not the other of the left and upper neighbouring blocks hasits Merge flag set to 1; and

2 if each of the left and upper neighbouring blocks has its Merge flagset to 1.

This simple measure achieves a coding efficiency improvement overVTM2.0. Another advantage, compared to the seventh and eighthembodiments, is a lower complexity because only the Merge flags and notthe Merge indexes of the neighbouring blocks need to be checked.

In a variant, the context variable for a bit of the Merge index of thecurrent block depends on the Merge flag of a single neighbouring block.

Tenth Embodiment

In the third to ninth embodiments, the context variable for a bit of theMerge index of the current block depended on Merge index values or Mergeflags of one or more neighbouring blocks.

In the tenth embodiment, the context variable for a bit of the Mergeindex of the current block depends on the value of the Skip flag for thecurrent block (current Coding Unit, or CU). The Skip flag is equal to 1when the current block uses the Merge Skip mode, and is equal to 0otherwise.

The Skip flag is a first example of another variable or syntax elementalready been decoded or parsed for the current block. This othervariable or syntax element preferably is an indicator of a complexity ofthe motion information in the current block. Since the occurrences ofthe Merge index values depend on the complexity of the motioninformation a variable or syntax element such as the Skip flag isgenerally correlated with the merge index value.

More specifically, the Merge Skip mode is generally selected for staticscenes or scenes involving constant motion. Consequently, the mergeindex value is generally lower for the Merge Skip mode than for theclassical merge mode which is used to encode an inter prediction whichcontains a block residual. This occurs generally for more complexmotion. However, the selection between these modes is also often relatedto the quantization and/or the RD criterion.

This simple measure provides a coding efficiency increase over VTM2.0.It is also very simple to implement as it does not involve neighbouringblocks or checking Merge index values.

In a first variant, the context variable for a bit of the Merge index ofthe current block is simply set equal to the Skip flag of the currentblock. The bit may be the first bit only. Other bits are bypass coded asin the first embodiment.

In a second variant, all bits of the Merge index are CABAC coded andeach of them has its own context variable depending on the Merge flag.This requires 10 states of probabilities when there are 5 CABAC-codedbits in the Merge index (corresponding to 6 Merge candidates).

In a third variant, to limit the number of states, only N bits of theMerge index are CABAC coded, where N is two or more, for example thefirst N bits. This requires 2N states. For example, when the first 2bits are CABAC coded, 4 states are required.

Generally, in place of the Skip flag, it is possible to use any othervariable or syntax element that has already been decoded or parsed forthe current block and that is an indicator of a complexity of the motioninformation in the current block.

Eleventh Embodiment

The eleventh embodiment relates to Affine Merge signalling as describedpreviously with reference to FIGS. 11(a), 11(b) and 12.

In the eleventh embodiment, the context variable for a CABAC coded bitof the Merge index of the current block (current CU) depends on theAffine Merge candidates, if any, in the list of Merge candidates. Thebit may be the first bit only of the Merge index, or the first N bits,where N is two or more, or any N bits. Other bits are bypass coded.

Affine prediction is designed for compensating complex motion.Accordingly, for complex motion the merge index generally has highervalues than for less complex motion. It follows that if the first AffineMerge candidate is far down the list, or if there is no Affine Mergecandidate at all, the merge index of the current CU is likely to have asmall value.

It is therefore effective for the context variable to depend on thepresence and/or position of at least one Affine Merge candidate in thelist.

For example, the context variable may be set equal to:

-   -   1 if A1 is affine    -   2 if B1 is affine    -   3 if B0 is affine    -   4 if A0 is affine    -   5 if B2 is affine    -   0 if no neighbouring block is affine.

When the Merge index of the current block is decoded or parsed theaffine flags of the Merge candidates at these positions have alreadybeen checked. Consequently, no further memory accesses are needed toderive the context for the Merge index of the current block.

This embodiment provides a coding efficiency increase over VTM2.0. Noadditional memory accesses are required since step 1205 already involveschecking the neighbouring CU affine modes.

In a first variant, to limit the number of states, the context variablemay be set equal to:

-   -   0 if no neighbouring block is affine, or if A1 or B1 is affine    -   1 if B0, A0 or B2 is affine

In a second variant, to limit the number of states, the context variablemay be set equal to:

-   -   0 if no neighbouring block is affine    -   1 if A1 or B1 is affine    -   2 if B0, A0 or B2 is affine

In a third variant, the context variable may be set equal to:

-   -   1 if A1 is affine    -   2 if B1 is affine    -   3 if B0 is affine    -   4 if A0 or B2 is affine    -   0 if no neighbouring block is affine.

Please note that these positions are already checked when the mergeindex is decoded or parsed because the affine flag decoding depends onthese positions. Consequently, there is no need for additional memoryaccess to derive the Merge index context which is coded after the affineflag.

Twelfth Embodiment

In the twelfth embodiment, signalling the affine mode comprisesinserting affine mode as a candidate motion predictor.

In one example of the twelfth embodiment, the Affine Merge (and AffineMerge Skip) is signalled as a Merge candidate (i.e. as one of the Mergecandidates for use with the classical Merge mode or the classical MergeSkip mode). In that case the modules 1205, 1206 and 1207 of FIG. 12 areremoved. In addition, not to affect the coding efficiency of the Mergemode, the maximum possible number of Merge candidates is incremented.For example, in the current VTM version this value is set equal to 6, sowith if applying this embodiment to the current version of VTM, thevalue would be 7.

The advantage is a design simplification of the syntax element of theMerge modes because fewer syntax elements need to be decoded. In somecircumstances, a coding efficiency improvement/change can be observed.

Two possibilities to implement this example will now be described:

The Merge index for the Affine Merge candidate always has the sameposition inside the list whatever the value of the other Merge MV. Theposition of a candidate motion predictor indicates its likelihood ofbeing selected and as such if it is placed higher up the list (a lowerindex value), that motion vector predictor is more likely to beselected.

In the first example, the Merge index for the Affine Merge candidatealways has the same position inside the list of Merge candidates. Thismeans that it has a fixed “Merge idx” value. For example, this value canbe set equal to 5, as the Affine Merge mode should represent a complexmotion which is not the most probable content. The additional advantageof this embodiment is that when the current block is parsed(decoding/reading of the syntax element only but not decoding the dataitself), the current block can be set as affine block. Consequently thevalue can be used to determine the CABAC context for the affine flagwhich is used for AMVP. So the conditional probabilities should beimproved for this affine flag and the coding efficiency should bebetter.

In a second example, the Affine Merge candidate is derived with otherMerge candidates. In this example, a new Affine Merge candidate is addedinto the list of Merge candidates (for the classical Merge mode or theclassical Merge Skip mode). FIG. 16 illustrates this example. Comparedto FIG. 13 , the Affine Merge candidate is the first affine neighbouringblock from A1, B1, B0, A0, and B2 (1917). If the same condition as 1205of FIG. 12 is valid (1927), the motion vector field produced with theaffine parameters is generated to obtain the Affine Merge candidate(1929). The list of initial Merge candidates can have 4, 5, 6 or 7candidates according to the usage of ATMVP, Temporal and Affine Mergecandidates.

The order between all these candidate is important as more likelycandidates should be processed first to ensure they are more likely tomake the cut of motion vector candidates—a preferred ordering is thefollowing:

A1

B1

B0

A0

AFFINE MERGE

ATMVP

B2

TEMPORAL

Combined

Zero_MV

It is important to note that the Affine Merge candidate is positionedbefore the ATMVP candidate but after the four main neighbouring blocks.An advantage to setting the Affine Merge candidate before the ATMVPcandidate is a coding efficiency increase, as compared to setting itafter the ATMVP and the temporal predictor candidate. This codingefficiency increase depends on the GOP (group of pictures) structure andQuantization Parameter (QP) setting of each picture in the GOP. But forthe most use GOP and QP setting this order give a coding efficiencyincrease.

A further advantage of this solution is a clean design of the classicalMerge and classical Merge Skip modes (i.e. the Merge modes withadditional candidates such as ATMVP or Affine Merge candidate) for bothsyntax and derivation process. Moreover, the Merge index for the AffineMerge candidate can change according to the availability or value(duplicate check) of previous candidates in the list of Mergecandidates. Consequently an efficient signalization can be obtained.

In a further example, the Merge index for the Affine Merge candidate isvariable according to one or several conditions.

For example, the Merge index or the position inside the list associatedwith the Affine Merge candidate changes according to a criterion. Theprinciple is to set a low value for the Merge index corresponding to theAffine Merge candidate when the Affine Merge candidate has a highprobability of being selected (and a higher value when there is lowprobability to be selected).

In the twelfth embodiment, the Affine Merge candidate has a Merge indexvalue. To improve the coding efficiency of the Merge index, it iseffective to make the context variable for a bit of the Merge indexdependent on the affine flags for neighbouring blocks and/or for thecurrent block.

For example, the context variable may be determined using the followingformula:ctxIdx=IsAffine(A1)+IsAffine(B1)+IsAffine(B0)+IsAffine(A0)+IsAffine(B2)

The resulting context value may have the value 0, 1, 2, 3, 4 or 5.

The affine flags increase the coding efficiency.

In a first variant, to involve fewer neighbouring blocks,ctxIdx=IsAffine(A1)+IsAffine(B1). The resulting context value may havethe value 0, 1, or 2.

In a second variant, also involving fewer neighbouring blocks,ctxIdx=IsAffine(A2)+IsAffine(B3). Again, the resulting context value mayhave the value 0, 1, or 2.

In a third variant, involving no neighbouring blocks,ctxIdx=IsAffine(current block). The resulting context value may have thevalue 0 or 1.

FIG. 15 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode with the third variant. In thisfigure, the Skip flag (1601), the prediction mode (1611), the Merge flag(1603), the Merge Index (1608) and the affine flag (1606) can bedecoded. This flow chart is similar to that of FIG. 12 , describedhereinbefore, and a detailed description is therefore omitted. Thedifference is that the Merge index decoding process takes into accountof the affine flag so that it is possible to use the affine flag, whichis decoded before the Merge index, when obtaining a context variable forthe Merge index, which is not the case in VTM 2.0. In VTM2.0 the affineflag of the current block cannot be used to obtain the context variablefor the Merge index because it always has the same value ‘0’.

Thirteenth Embodiment

In the tenth embodiment, the context variable for a bit of the Mergeindex of the current block depends on the value of the Skip flag for thecurrent block (current Coding Unit, or CU).

In the thirteenth embodiment, instead of using the Skip flag valuedirectly to derive the context variable for the target bit of the Mergeindex, the context value for the target bit is derived from the contextvariable used for coding the Skip flag of the current CU. This ispossible because the Skip flag is itself CABAC coded and therefore has acontext variable.

Preferably, the context variable for the target bit of the Merge indexof the current CU is set equal to (copied from) the context variableused for coding the Skip flag of the current CU.

The target bit may be the first bit only. Other bits may be bypass codedas in the first embodiment.

The context variable for the Skip flag of the current CU is derived inthe manner prescribed in VTM2.0. The advantage of this embodimentcompared to the VTM2.0 reference software is a complexity reduction ofthe Merge index decoding and decoder design (and encoder design) withoutimpact on the coding efficiency. Indeed, with this embodiment, at theminimum only 1 CABAC state is needed for coding the Merge index insteadof 5 for the current VTM Merge index coding (encoding/decoding).Moreover, it reduces the worst-case complexity because the other bitsare CABAC bypass coded which reduces the number of operations comparedto coding all bits with CABAC.

Fourteenth Embodiment

In the thirteenth embodiment, the context value for the target bit wasderived from the context variable for the Skip flag of the current CU.

In the fourteenth embodiment, the context value for the target bit isderived from the context variable for the affine flag of the current CU.

This is possible because the affine flag is itself CABAC coded andtherefore has a context variable.

Preferably, the context variable for the target bit of the Merge indexof the current CU is set equal to (copied from) the context variable forthe affine flag of the current CU.

The target bit may be the first bit only. Other bits are bypass coded asin the first embodiment.

The context variable for the affine flag of the current CU is derived inthe manner prescribed in VTM2.0.

The advantage of this embodiment compared to the VTM2.0 referencesoftware is a complexity reduction in the Merge index decoding anddecoder design (and encoder design) without impact on coding efficiency.Indeed, with this embodiment, at the minimum only 1 CABAC state isneeded for the Merge index instead of 5 for the current VTM Merge indexcoding (encoding/decoding). Moreover, it reduces the worst-casecomplexity because the other bits are CABAC bypass coded which reducesthe number of operations compared to coding all bits with CABAC.

Fifteenth Embodiment

In several of the foregoing embodiments, the context variable had morethan 2 values, for example the three values 0, 1 and 2. However, toreduce the complexity, and reduce the number of states to be handled, itis possible to cap the number of permitted context-variable values at 2,e.g. 0 and 1. This can be accomplished, for example, by changing anyinitial context variable having the value 2 to 1. In practice, thissimplification has no or only a limited impact on the coding efficiency.

Combinations of Embodiments and Other Embodiments

Any two or more of the foregoing embodiments may be combined.

The preceding description has focussed on the encoding and decoding ofthe Merge index. For example, the first embodiment involves generating alist of Merge candidates including an ATMVP candidate (for the classicalMerge mode or the classical Merge Skip mode, i.e. the non-Affine Mergemode or the non-Affine Merge Skip mode); selecting one of the Mergecandidates in the list; and generating a Merge index for the selectedMerge candidate using CABAC coding, one or more bits of the Merge indexbeing bypass CABAC coded. In principle, the present invention can beapplied to modes other than the Merge modes (e.g. an Affine Merge mode)that involve generating a list of motion information predictorcandidates (e.g. a list of Affine Merge candidates or motion vectorpredictor (MVP) candidates); selecting one of the motion informationpredictor candidates (e.g. MVP candidates) in the list; and generatingan identifier or an index for the selected motion information predictorcandidate in the list (e.g. the selected Affine Merge candidate or theselected MVP candidate for predicting the motion vector of the currentblock). Thus, the present invention is not limited to the Merge modes(i.e. the classical Merge mode and the classical Merge Skip mode) andthe index to be encoded or decoded is not limited to the Merge index.For example, in the development of VVC, it is conceivable that thetechniques of the foregoing embodiments could be applied to (or extendedto) a mode other than the Merge modes, such as the AMVP mode of HEVC orits equivalent mode in VVC or the Affine Merge mode. The appended claimsare to be interpreted accordingly.

As discussed, in the foregoing embodiments, one or more motioninformation candidate (e.g. motion vector) for the Affine Merge modes(Affine Merge or Affine Merge Skip mode) and/or one or more affineparameter are obtained from the first neighbouring block which is affinecoded among spatially neighbouring blocks (e.g. at positions A1, B1, B0,A0, B2) or temporally associated blocks (e.g. a “Center” block with acollocated block or a spatial neighbour thereof such as “H”). Thesepositions are depicted in FIGS. 6 a and 6 b . To enable this obtaining(e.g. deriving or sharing or “merging”) of the one or more motioninformation and/or affine parameter between a current block (or a groupof sample/pixel values that are currently being encoded/decoded, e.g. acurrent CU) and a neighbouring block (either spatially neighbouring ortemporally associated to the current block), one or more Affine Mergecandidate are added to the list of Merge candidates (i.e. classicalMerge mode candidates) so that when the selected Merge candidate (whichis then signalled using a Merge index, for example using a syntaxelement such as “merge_idx” in HEVC or a functionally equivalent syntaxelement thereof) is the Affine Merge candidate, the current CU/block isencoded/decoded using the Affine Merge mode with the Affine Mergecandidate.

As mentioned above, such one or more Affine Merge candidates forobtaining (e.g. deriving or sharing) of the one or more motioninformation for the Affine Merge mode and/or affine parameter can alsobe signalled using a separate list (or a set) of Affine Merge candidates(which can be the same or different from the list of Merge candidatesused for the classical Merge mode).

According to an embodiment of the present invention, when the techniquesof the foregoing embodiments are applied to the Affine Merge mode, thelist of Affine Merge candidates may be generated using the sametechnique as the motion vector derivation process for the classicalMerge mode as shown in, and described in relation to, FIG. 8 , or as theMerge candidates derivation process shown in, and described in relationto, FIG. 13 . Advantage of sharing the same technique togenerate/compile this list of Affine Merge candidates (for the AffineMerge mode or the Affine Merge Skip mode) and the list of Mergecandidates (for the classical Merge mode or the classical Merge Skipmode) is reduction in complexity in the encoding/decoding process whencompared with having separate techniques.

According to another embodiment, a separate technique shown below inrelation to FIG. 24 may be used to generate/compile the list of AffineMerge candidates.

FIG. 24 is a flow chart illustrating an Affine Merge candidatederivation process for the Affine Merge mode (the Affine Merge mode andthe Affine Merge Skip mode). In a first step of the derivation process,five block positions are considered (2401 to 2405) forobtaining/deriving spatial Affine Merge candidates 2413. These positionsare the spatial positions depicted in FIG. 6 a (and FIG. 6 b ) withreferences A1, B1, B0, A0, and B2. In a following step, the availabilityof the spatial motion vectors is checked and it is determined whethereach of Inter mode coded blocks associated with each position A1, B1,B0, A0, and B2 are coded with the affine mode (e.g. using any one ofAffine Merge, Affine Merge Skip or Affine AMVP mode) (2410). At mostfive motion vectors (i.e. spatial Affine Merge candidates) areselected/obtained/derived. A predictor is considered as available if itexists (e.g. there is information for obtaining/deriving a motion vectorassociated with that position) and if the block is not INTRA coded andif the block is affine (i.e. coded using the Affine mode).

Then Affine motion information is derived/obtained (2411) for eachavailable block position (2410). This derivation is performed for thecurrent block based on the affine model (and its affine model parametersdiscussed in relation to FIGS. 11(a) and 11(b), for example) of theblock position. Then a pruning process (2412) is applied to removecandidates which give the same affine motion compensation (or which havethe same affine model parameters) as another one previously added to thelist.

At the end of this stage, the list of spatial Affine Merge candidatescomprises up to five candidates.

If the number (Nb_Cand) of candidates is strictly less (2426) than themaximum number of candidates (here, Max_Cand is a value which issignalled in the bitstream slice header and is equal to five for AffineMerge mode but can be different/variable depending on theimplementation).

Then the constructed Affine Merge candidates (i.e. additional AffineMerge candidates which are generated to provide some diversity as wellas approach the target number, playing a similar role as the combinedbi-predictive Merge candidates in HEVC for example) are generated(2428). These constructed Affine Merge candidates are based on themotion vectors associated with neighbouring spatial and temporalpositions of the current block. First, the control points are defined(2418, 2419, 2420, 2421) in order to generate the motion information forgenerating an affine model. Two of these control points correspond to v₀and v₁ of FIGS. 11(a) and 11(b), for example. These four control pointscorrespond to the four corners of the current block.

The control point top left (2418)'s motion information is obtained from(e.g. by equating it to) the motion information of the block position atthe position B2 (2405) if it exists and if this block is coded with anINTER mode (2414). Otherwise, the control point top left (2418)'s motioninformation is obtained from (e.g. by equating it to) the motioninformation of the block position at the position B3 (2406) (as depictedin FIG. 6 b ) if it exists and if this block is coded with an INTER mode(2414) and if it is not the case, the control point top left (2418)'smotion information is obtained from (e.g. equated to) the motioninformation of the block position at the position A2 (2407) (as depictedin FIG. 6 b ) if it exists and if this block is coded with an INTER mode(2414). When no block is available for this control point it isconsidered as being unavailable (non-available).

The control point top right (2419)'s motion information is obtained from(e.g. equated to) the motion information of the block position at theposition B1 (2402) if it exists and if this block is coded with an INTERmode (2415). Otherwise, the control point top right (2419)'s motioninformation is obtained from (e.g. equated to) the motion information ofthe block position at the position B0 (2403) if it exists and if thisblock is coded with an INTER mode (2415). When no block is available forthis control point it is considered as being unavailable(non-available).

The control point bottom left (2420)'s motion information is obtainedfrom (e.g. equated to) the motion information of the block position atthe position A1 (2401) if it exists and if this block is coded with anINTER mode (2416). Otherwise, the control point bottom left (2420) smotion information is obtained from (e.g. equated to) the motioninformation of the block position at the position A0 (2404) if it existsand if this block is coded with an INTER mode (2416). When no block isavailable for this control point it is considered as being unavailable(non-available).

The control point bottom right (2421)'s motion information is obtainedfrom (e.g. equated to) the motion information of the temporal candidate,e.g. the collocated block position at the position H (2408) (as depictedin FIG. 6 a ) if it exists and if this block is coded with an INTER mode(2417). When no block is available for this control point it isconsidered as being unavailable (non-available).

Based on these control points, up to 10 constructed Affine Mergecandidates can be generated (2428). These candidates are generated basedon an affine model with 4, 3 or 2 control points. For example, the firstconstructed Affine Merge candidate may be generated using the 4 controlpoints. Then the 4 following constructed Affine Merge candidates are the4 possibilities which can be generated using 4 different sets of 3control points (i.e. 4 different possible combinations of a setcontaining 3 out of the 4 available control points). Then the otherconstructed Affine Merge candidates are those generated using differentsets of 2 control points (i.e. different possible combinations of a setcontaining 2 of the 4 control points).

If the number (Nb_Cand) of candidates remains strictly less (2430) thanthe maximum number of candidates (Max_Cand) after adding theseadditional (constructed) Affine Merge candidates, other additionalvirtual motion information candidates such as zero motion vectorcandidates (or even combined bi-predictive merge candidates whereapplicable) are added/generated (2432) until the number of candidates inthe list of Affine Merge candidates reaches the target number (e.g.maximum number of candidates).

At the end of this process, the list or set of Affine Merge modecandidates (i.e. a list or set of candidates for the Affine Merge modes,which are the Affine Merge mode and the Affine Merge Skip mode) isgenerated/built (2434). As illustrated in FIG. 24 , the list or set ofAffine Merge (motion vector predictor) candidates is built/generated(2434) from a subset of spatial candidates (2401 to 2407) and a temporalcandidate (2408). It is understood that according to embodiments of theinvention, other Affine Merge candidate derivation processes withdifferent order for checking availability, pruning process, ornumber/type of potential candidates (e.g. ATMVP candidate may be alsoadded in a similar manner to the Merge candidate list derivation processin FIG. 13 or FIG. 16 ) may also be used to generate the list/set ofAffine Merge candidates.

Following embodiment illustrates how a list (or a set) of Affine Mergecandidates can be used to signal (e.g. encode or decode) a selectedAffine Merge candidate (which can be signalled using a Merge index usedfor the Merge mode or a separate Affine Merge index specifically for usewith the Affine Merge mode).

In the following embodiment: a MERGE mode (i.e. a merge mode other thanan AFFINE MERGE mode defined later, in other words classical non-AffineMerge mode or classical non-Affine Merge Skip mode) is a type of mergemode where motion information of either spatially neighbouring ortemporally associated block is obtained for (or derived for or sharedwith) the current block, a MERGE mode predictor candidate (i.e. a Mergecandidate) is information regarding one or more spatially neighbouringor temporally associated block from which the current block canobtain/derive the motion information in the MERGE mode, a MERGE modepredictor is a selected MERGE mode predictor candidate whose informationis used when predicting the motion information of the current block andduring the signalling in the MERGE mode (e.g. encoding or decoding)process an index (e.g. a MERGE index) identifying the MERGE modepredictor from a list (or set) of MERGE mode predictor candidates issignalled, an AFFINE MERGE mode is a type of merge mode where motioninformation of either spatially neighbouring or temporally associatedblock is obtained for (derived for or shared with) the current block sothat motion information and/or affine parameter for Affine modeprocessing (or Affine motion model processing) of the current block canmake use of this obtained/derived/shared motion information, an AFFINEMERGE mode predictor candidate (i.e. an Affine Merge candidate) isinformation regarding one or more spatially neighbouring or temporallyassociated block from which the current block can obtain/derive themotion information in the AFFINE MERGE mode, and an AFFINE MERGE modepredictor is a selected AFFINE MERGE mode predictor candidate whoseinformation is usable in the Affine motion model when predicting themotion information of the current block and during the signalling in theAFFINE MERGE mode (e.g encoding or decoding) process an index (e.g. anAFFINE MERGE index) identifying the AFFINE MERGE mode predictor from alist (or set) of AFFINE MERGE mode predictor candidates is signalled. Itis understood that in the following embodiment, the AFFINE MERGE mode isa merge mode which has its own AFFINE MERGE index (an identifier whichis a variable) for identifying one AFFINE MERGE mode predictor candidatefrom a list/set of candidates (also known as an “Affine Merge list” or a“subblock Merge list”), as opposed to having a single index valueassociated with it, wherein the AFFINE MERGE index is signalled toidentify that particular AFFNE MERGE mode predictor candidate.

It is understood that in the following embodiment, the “MERGE mode”refers to either one of the classical Merge mode or the classical MergeSkip mode in HEVC/JEM/VTM or any functionally equivalent mode, providedthat such obtaining (e.g. deriving or sharing) of the motion informationand signalling of the Merge index as described above is used in saidmode. The “AFFINE MERGE mode” also refers to either one of the AffineMerge mode or the Affine Merge Skip mode (if present and uses suchobtaining/deriving) or any other functionally equivalent mode, providedthe same features are used in said mode.

Sixteenth Embodiment

In the sixteenth embodiment, a motion information predictor index foridentifying an AFFINE MERGE mode predictor (candidate) from the list ofAFFINE MERGE candidates is signalled using CABAC coding, wherein one ormore bits of the motion information prediction index is bypass CABACcoded.

According to a first variant of the embodiment, at an encoder, a motioninformation predictor index for an AFFINE MERGE mode is encoded by:generating a list of motion information predictor candidates; selectingone of the motion information predictor candidates in the list as anAFFINE MERGE mode predictor; and generating a motion informationpredictor index for the selected motion information predictor candidateusing CABAC coding, one or more bits of the motion information predictorindex being bypass CABAC coded. Data indicating an index for thisselected motion information predictor candidate is then included in abitstream. A decoder then, from the bitstream including this data,decodes the motion information predictor index for the AFFINE MERGE modeby: generating a list of motion information predictor candidates;decoding the motion information predictor index using CABAC decoding,one or more bits of the motion information predictor index being bypassCABAC decoded; when the AFFINE MERGE mode is used, using the decodedmotion information predictor index to identify one of the motioninformation predictor candidates in the list as an AFFINE MERGE modepredictor.

According to a further variant of the first variant, one of the motioninformation predictor candidates in the list is also selectable as aMERGE mode predictor when a MERGE mode is used so that when the MERGEmode is used, the decoder can use the decoded motion informationpredictor index (e.g. MERGE index) to identify one of the motioninformation predictor candidates in the list as a MERGE mode predictor.In this further variant, an AFFINE MERGE index is used to signal anAFFINE MERGE mode predictor (candidate), and the AFFINE MERGE indexsignalling is implemented using an index signalling that is analogous tothe MERGE index signalling according to any one of the first tofifteenth embodiments or the MERGE index signalling used in the currentVTM or HEVC.

In this variant, when the MERGE mode is used the MERGE index signallingcan be implemented using the MERGE index signalling according to any oneof the first to fifteenth embodiment or the MERGE index signalling usedin the current VTM or HEVC. In this variant, the AFFINE MERGE indexsignalling and the MERGE index signalling can use different indexsignalling schemes. The advantage of this variant is that it achieves abetter coding efficiency by using an efficient index coding/signallingfor both the AFFINE MERGE mode and MERGE mode. Further, in this variantseparate syntax elements can be used for the MERGE index (such as “Mergeidx[ ][ ]” in HEVC or functional equivalent thereof) and the AFFINEMERGE index (such as “A_Merge_idx[ ][ ]”). This enables the MERGE indexand the AFFINE MERGE index to be signalled (encoded/decoded)independently.

According to yet another further variant, when the MERGE mode is usedand one of the motion information predictor candidates in the list isalso selectable as the MERGE mode predictor, the CABAC coding uses thesame context variable for at least one bit of the motion informationpredictor index (e.g. the MERGE index or the AFFINE MERGE index) of thecurrent block for both modes, i.e. when the AFFINE MERGE mode is usedand when the MERGE mode is used, so that the at least one bit of theAFFINE MERGE index and the MERGE index share the same context variable.A decoder then, when the MERGE mode is used, uses the decoded motioninformation predictor index to identify one of the motion informationpredictor candidates in the list as the MERGE mode predictor, whereinthe CABAC decoding uses the same context variable for the at least onebit of the motion information predictor index of the current block forboth modes, i.e. when the AFFINE MERGE mode is used and when the MERGEmode is used.

According to a second variant of the embodiment, at an encoder, a motioninformation predictor index is encoded by: generating a list of motioninformation predictor candidates; when an AFFINE MERGE mode is used,selecting one of the motion information predictor candidates in the listas an AFFINE MERGE mode predictor; when a MERGE mode is used, selectingone of the motion information predictor candidates in the list as aMERGE mode predictor; and generating a motion information predictorindex for the selected motion information predictor candidate usingCABAC coding, one or more bits of the motion information predictor indexbeing bypass CABAC coded. Data indicating an index for this selectedmotion information predictor candidate is then included in a bitstream.A decoder then, from the bitstream, decodes the motion informationpredictor index by: generating a list of motion information predictorcandidates; decoding the motion information predictor index using CABACdecoding, one or more bits of the motion information predictor indexbeing bypass CABAC decoded; when the AFFINE MERGE mode is used, usingthe decoded motion information predictor index to identify one of themotion information predictor candidates in the list as the AFFINE MERGEmode predictor; and when the MERGE mode is used, using the decodedmotion information predictor index to identify one of the motioninformation predictor candidates in the list as the MERGE modepredictor.

According to a further variant of the second variant, the AFFINE MERGEindex signalling and the MERGE index signalling use the same indexsignalling scheme according to any one of the first to fifteenthembodiment or the MERGE index signalling used in the current VTM orHEVC. An advantage of this further variant is a simple design duringimplementation, which also can lead to less complexity. In this variant,when the AFFINE MERGE mode is used, the encoder's the CABAC codingcomprises using a context variable for at least one bit of the motioninformation predictor index (AFFINE MERGE index) of a current block, thecontext variable being separable from another context variable for theat least one bit of the motion information predictor index (MERGE index)when the MERGE mode is used; and data for indicating use of the AFFINEMERGE mode is included in a bitstream so that the context variables forthe AFFINE MERGE mode and the MERGE mode can be distinguished(distinctly identified) for the CABAC decoding process. The decoder thenobtains, from the bitstream, data for indicating use of the AFFINE MERGEmode in a bitstream; and when the AFFINE MERGE mode is used, the CABACdecoding uses this data to distinguish between the context variables forthe AFFINE MERGE index and the MERGE index. Further, at the decoder, thedata for indicating use of the AFFINE MERGE mode can also be used togenerate a list (or set) of AFFINE MERGE mode predictor candidates whenthe obtained data indicates use of the AFFINE MERGE mode, or to generatea list (or set) of MERGE mode predictor candidates when the obtaineddata indicates use of the MERGE mode.

This variant enables both the MERGE index and the AFFINE MERGE index tobe signalled using the same index signalling scheme whilst the MERGEindex and the AFFINE MERGE index are still encoded/decoded independentlyfrom each other (e.g. by using separate context variables).

One way of using the same index signalling scheme is to use the samesyntax element for both the AFFINE MERGE index and the MERGE index, thatis the motion information predictor index for the selected motioninformation predictor candidate is encoded using the same syntax elementfor both cases, when the AFFINE MERGE mode is used and when the MERGEmode is used. Then at the decoder, the motion information predictorindex is decoded by parsing, from the bitstream, the same syntax elementregardless of whether the current block was encoded (and is beingdecoded) using the AFFINE MERGE mode or the MERGE mode.

FIG. 22 illustrates a partial decoding process of some syntax elementsrelated to a coding mode (i.e. the same index signalling scheme)according to this variant of the sixteenth embodiment. This figureillustrates the signalling of the AFFINE MERGE index (2255—“Merge idxAffine”) for the AFFINE MERGE mode (2257:Yes) and of the MERGE index(2258—“Merge idx”) for the MERGE mode (2257:No) with the same indexsignalling scheme. It is understood that in some variants, the AFFINEMERGE candidate list can include an ATMVP candidate as in the Mergecandidate list of the current VTM. The coding of the AFFINE MERGE indexis similar to the coding of the MERGE index for the MERGE mode asdepicted in FIG. 10(a) and FIG. 10(b). In some variants, even if theAFFINE MERGE candidates derivation does not define an ATMVP mergecandidate, the AFFINE MERGE index is coded as described in FIG. 10(b)when ATMVP is enabled for the MERGE mode with maximum of 5 othercandidates (i.e. in total, 6 candidates) so that the maximum number ofcandidates in the AFFINE MERGE candidate list matches the maximum numberof candidates in the MERGE candidate list. So, each bit of the AFFINEMERGE index has its own context. All context variables used for the bitsof the Merge index signalling are independent of the context variablesused for the bits of the AFFINE MERGE Index signalling.

According to a further variant, this same index signalling scheme sharedby the MERGE index and the AFFINE MERGE index signalling uses CABACcoding on the first bin only as in the first embodiment. That is allbits except for a first bit of the motion information predictor indexare bypass CABAC coded. In this further variant of the sixteenthembodiment, when ATMVP is included as a candidate in one of the list ofMERGE candidates or the list of AFFINE MERGE candidates (for example,when ATMVP is enabled at SPS level) the coding of each index (i.e. theMERGE index or the AFFINE MERGE index) is modified so that only thefirst bit of the index is coded by CABAC using a single context variableas shown in FIG. 14 . This single context is set in the same manner asin the current VTM reference software when ATMVP is not enabled at SPSlevel. The other bits (from the 2^(nd) to the 5^(th) bit or 4^(th) bitif there are only 5 candidates in the list) are bypass coded. When ATMVPis not included as a candidate in the list of MERGE candidates (forexample, when ATMVP is disabled at SPS level), there are 5 MERGEcandidates and 5 AFFINE MERGE candidates available for use. Only thefirst bit of the MERGE index for the MERGE mode is coded by CABAC usinga first single context variable. And only the first bit of the AFFINEMERGE index for the AFFINE MERGE mode is coded by CABAC using a secondsingle context variable. These first and second context variables areset in the same manner as in the current VTM reference software whenATMVP is not enabled at SPS level for both the MERGE index and theAFFINE MERGE index. The other bits (from the 2^(nd) to the 4^(th) bit)are bypass decoded.

The decoder generates the same list of MERGE candidates and the samelist of AFFINE MERGE candidates as the encoder. This is accomplished byusing the method of FIG. 22 . Although the same index signalling schemeis used for both the MERGE mode and the AFFINE MERGE mode, the affineflag (2256) is used to determine whether data currently being decoded isfor the MERGE index or the AFFINE MERGE index so that the first andsecond context variables are separable (or distinguishable) from eachother for the CABAC decoding process. That is, the affine flag (2256) isused during the index decoding process (i.e. used at step 2257) todetermine whether to decode “merge_idx 2258” or “merge_idx Affine 2255”.When ATMVP is not included as a candidate in the list of MERGEcandidates (for example, when ATMVP is disabled at SPS level) there are5 MERGE candidates for both the lists of candidates (for the MERGE modeand the AFFINE MERGE mode). Only the first bit of the MERGE index isdecoded by CABAC using the first single context variable. And only thefirst bit of the AFFINE MERGE index is decoded by CABAC using the secondsingle context variable. All other bits (from the 2^(nd) to the 4^(th)bit) are bypass decoded. In contrast to the current reference software,when ATMVP is included as a candidate in the list of MERGE candidates(for example, when ATMVP is enabled at SPS level), only the first bit ofthe MERGE index is decoded by CABAC using the first single contextvariable in the decoding of the MERGE index and using the second singlecontext variable in the decoding of the AFFINE MERGE index. The otherbits (from the 2^(nd) to the 5^(th) bit or 4^(th) bit) are bypassdecoded. The decoded index is then used to identify the candidateselected by the encoder from the corresponding list of candidates (i.e.the MERGE candidates or the AFFINE MERGE candidates).

The advantage of this variant is that use of the same index signallingscheme for both the MERGE index and the AFFINE MERGE index leads to acomplexity reduction in the index decoding and the decoder design (andthe encoder design) for implementing these two different modes, withoutsignificant impact on the coding efficiency. Indeed, with this variableonly 2 CABAC states (one for each of the first and second single contextvariable) are needed for the index signalling, instead of 9 or 10 whichwould have been the case if all bits of the MERGE index and all bits ofthe AFFINE MERGE index are CABAC encoded/decoded. Moreover, it reducesthe worst-case complexity because all other bits (apart from the firstbit) are CABAC bypass coded, which reduces the number of operationsneeded during the CABAC encoding/decoding process compared to coding allbits with CABAC.

According to yet another further variant, the CABAC coding or decodinguse the same context variable for at least one bit of the motioninformation predictor index of a current block for both when the AFFINEMERGE mode is used and when the MERGE mode is used. In this furthervariant, the context variable used for the first bit of the MERGE indexand the first bit of the AFFINE MERGE index is independent of whichindex is being encoded or decoded, that is the first and second singlecontext variables (from the previous variant) are notdistinguishable/separable and are the one and the same single contextvariable. So contrary to the previous variant, the MERGE index and theAFFINE MERGE index share one context variable during the CABAC process.As shown in FIG. 23 , the index signalling scheme is the same for boththe MERGE index and the AFFINE MERGE index, i.e. only one type of index“Merge idx (2308)” is encoded or decoded for both modes. As far as theCABAC decoder is concerned, the same syntax element is used for both theMERGE index and the AFFINE MERGE index, and there is no need todistinguish them when considering context variables. So there is no needto use the Affine flag (2306) to determine whether the current block isencoded (to be decoded) in AFFINE MERGE mode or not as in step (2257) ofFIG. 22 , and there is no branching after step 2306 in FIG. 23 as onlyone index (“merge idx”) needs decoding. The affine flag is used toperform the motion information prediction with the AFFINE MERGE mode,i.e. during prediction process after the CABAC decoder has decoded theindex (“merge_idx”). Moreover, only the first bit of this index (i.e.the MERGE index and the AFFINE MERGE index) is coded by CABAC using onesingle context and the other bits are bypass coded as described for thefirst embodiment. So in this further variant, one context variable forthe first bits of the MERGE index and the AFFINE MERGE index is sharedby both the MERGE index and AFFINE MERGE index signalling. If the sizeof the lists of candidates are different for the MERGE index and theAFFINE MERGE index, then the maximum number of bits for signalling therelevant index for each case can also be different, i.e. they areindependent from one another. So, the number of bypass coded bits can beadapted accordingly, if needed, according to the value of affine flag(2306), for example to enable parsing of data for the relevant indexfrom the bitstream.

The advantage of this variant is a complexity reduction in the MERGEindex and the AFFINE MERGE index decoding process and decoder design(and encoder design) without having a significant impact on the codingefficiency. Indeed, with this further variant, only 1 CABAC state isneeded when signalling both the MERGE index and the AFFINE MERGE index,instead of CABAC states of the previous variant or 9 or 10. Moreover, itreduces the worst-case complexity because all other bits (apart from thefirst bit) are CABAC bypass coded, which reduces the number ofoperations needed during the CABAC encoding/decoding process compared tocoding all bits with CABAC.

In the foregoing variants of this embodiment, the AFFINE MERGE indexsignalling and the MERGE index signalling may share one or more contextsas described in any of the first to fifteenth embodiment. The advantageof this is a complexity reduction from the reduction in the number ofcontexts needed to encode or decode these indexes.

In the foregoing variants of this embodiment, the motion informationpredictor candidate comprises information for obtaining (or deriving)one or more of: a direction, an identification for a list, a referenceframe index, and a motion vector. Preferably the motion informationpredictor candidate comprises information for obtaining a motion vectorpredictor candidate. In a preferred variant, the motion informationpredictor index (e.g. AFFINE MERGE index) is used to signal an AFFINEMERGE mode predictor candidate, and the AFFINE MERGE index signalling isimplemented using an index signalling that is an analogous to the MERGEindex signalling according to any one of the first to fifteenthembodiments or the MERGE index signalling used in the current VTM orHEVC (with the motion information predictor candidates for the AFFINEMERGE mode as the MERGE candidates).

In the foregoing variants of this embodiment, the generated list ofmotion information predictor candidates includes an ATMVP candidate asin the first embodiment or as in a variant of some of the otherforegoing second to fifteenth embodiments. Alternatively, the generatedlist of motion information predictor candidates does not include theATMVP candidate.

In the foregoing variants of this embodiment, the maximum number ofcandidates includable in the lists of candidates for the MERGE index andthe AFFINE MERGE index is fixed. The maximum number of candidatesincludable in the lists of candidates for the MERGE index and the AFFINEMERGE index may be the same. Then data for determining (or indicating)the maximum number (or the target number) of motion informationpredictor candidates includable in the generated list of motioninformation predictor candidates is included, by the encoder, in thebitstream, and the decoder obtains, from the bitstream, the data fordetermining a maximum number (or a target number) of motion informationpredictor candidates includable in the generated list of motioninformation predictor candidates. This enables parsing, from thebitstream, of data for decoding the MERGE index or the AFFINE

MERGE index. This data for determining (or indicating) the maximumnumber (or the target number) may be the maximum number (or the targetnumber) itself when decoded, or it may enable the decoder to determinethis maximum/target number in conjunction with other parameters/syntaxelements, for example “five_minus_max_num_merge_cand” or“MaxNumMergeCand-1” used in HEVC or functionally equivalent parametersthereof.

Alternatively, if the maximum number (or the target number) ofcandidates in the lists of candidates for the MERGE index and the AFFINEMERGE index can vary or can be different (e.g. because use of the ATMVPcandidate or any other optional candidate may be enabled or disabled forone list but not for the other list, or because the lists use differentcandidate list generation/derivation process), the maximum numbers (orthe target numbers) of motion information predictor candidatesincludable in the generated list of motion information predictorcandidates when the AFFINE MERGE mode is used and when the MERGE mode isused are determinable separately, and the encoder includes, in thebitstream, data for determining the maximum number(s)/target number(s).The decoder then obtains, from the bitstream, the data for determiningthe maximum/target number(s), and parses or decodes the motioninformation predictor index using the obtained data. The affine flag maythen be used to switch between parsing or decoding of the MERGE indexand the AFFINE MERGE index, for example.

Implementation of Embodiments of the Invention

One or more of the foregoing embodiments are implemented by theprocessor 311 of a processing device 300 in FIG. 3 , or correspondingfunctional module(s)/unit(s) of the encoder 400 in FIG. 4 , of thedecoder 60 in FIG. 5 , of the CABAC coder in FIG. 17 or a correspondingCABAC decoder thereof, which perform the method steps of the one or moreforegoing embodiments.

FIG. 19 is a schematic block diagram of a computing device 1300 forimplementation of one or more embodiments of the invention. Thecomputing device 1300 may be a device such as a micro-computer, aworkstation or a light portable device. The computing device 1300comprises a communication bus connected to:—a central processing unit(CPU) 2001, such as a microprocessor; —a random access memory (RAM) 2002for storing the executable code of the method of embodiments of theinvention as well as the registers adapted to record variables andparameters necessary for implementing the method for encoding ordecoding at least part of an image according to embodiments of theinvention, the memory capacity thereof can be expanded by an optionalRAM connected to an expansion port for example; —a read only memory(ROM) 2003 for storing computer programs for implementing embodiments ofthe invention; —a network interface (NET) 2004 is typically connected toa communication network over which digital data to be processed aretransmitted or received. The network interface (NET) 2004 can be asingle network interface, or composed of a set of different networkinterfaces (for instance wired and wireless interfaces, or differentkinds of wired or wireless interfaces). Data packets are written to thenetwork interface for transmission or are read from the networkinterface for reception under the control of the software applicationrunning in the CPU 2001; —a user interface (UI) 2005 may be used forreceiving inputs from a user or to display information to a user; —ahard disk (HD) 2006 may be provided as a mass storage device; —anInput/Output module (IO) 2007 may be used for receiving/sending datafrom/to external devices such as a video source or display. Theexecutable code may be stored either in the ROM 2003, on the HD 2006 oron a removable digital medium such as, for example a disk. According toa variant, the executable code of the programs can be received by meansof a communication network, via the NET 2004, in order to be stored inone of the storage means of the communication device 1300, such as theHD 2006, before being executed. The CPU 2001 is adapted to control anddirect the execution of the instructions or portions of software code ofthe program or programs according to embodiments of the invention, whichinstructions are stored in one of the aforementioned storage means.After powering on, the CPU 2001 is capable of executing instructionsfrom main RAM memory 2002 relating to a software application after thoseinstructions have been loaded from the program ROM 2003 or the HD 2006,for example. Such a software application, when executed by the CPU 2001,causes the steps of the method according to the invention to beperformed.

It is also understood that according to another embodiment of thepresent invention, a decoder according to an aforementioned embodimentis provided in a user terminal such as a computer, a mobile phone (acellular phone), a tablet or any other type of a device (e.g. a displayapparatus) capable of providing/displaying a content to a user.According to yet another embodiment, an encoder according to anaforementioned embodiment is provided in an image capturing apparatuswhich also comprises a camera, a video camera or a network camera (e.g.a closed-circuit television or video surveillance camera) which capturesand provides the content for the encoder to encode. Two such examplesare provided below with reference to FIGS. 20 and 21 .

FIG. 20 is a diagram illustrating a network camera system 2100 includinga network camera 2102 and a client apparatus 2104.

The network camera 2102 includes an imaging unit 2106, an encoding unit2108, a communication unit 2110, and a control unit 2112.

The network camera 2102 and the client apparatus 2104 are mutuallyconnected to be able to communicate with each other via the network 200.

The imaging unit 2106 includes a lens and an image sensor (e.g., acharge coupled device (CCD) or a complementary metal oxide semiconductor(CMOS)), and captures an image of an object and generates image databased on the image. This image can be a still image or a video image.The imaging unit may also comprise zooming means and/or panning meanswhich are adapted to zoom or pan (either optically or digitally)respectfully.

The encoding unit 2108 encodes the image data by using said encodingmethods explained in first to sixteenth embodiments. The encoding unit2108 uses at least one of encoding methods explained in first tosixteenth embodiments. For another instance, the encoding unit 2108 canuse combination of encoding methods explained in first to sixteenthembodiments.

The communication unit 2110 of the network camera 2102 transmits theencoded image data encoded by the encoding unit 2108 to the clientapparatus 2104.

Further, the communication unit 2110 receives commands from clientapparatus 2104. The commands include commands to set parameters for theencoding of the encoding unit 2108.

The control unit 2112 controls other units in the network camera 2102 inaccordance with the commands received by the communication unit 2110.

The client apparatus 2104 includes a communication unit 2114, a decodingunit 2116, and a control unit 2118.

The communication unit 2114 of the client apparatus 2104 transmits thecommands to the network camera 2102.

Further, the communication unit 2114 of the client apparatus 2104receives the encoded image data from the network camera 2102.

The decoding unit 2116 decodes the encoded image data by using saiddecoding methods explained in any of the first to sixteenth embodiments.For another instance, the decoding unit 2116 can use combination ofdecoding methods explained in the first to sixteenth embodiments.

The control unit 2118 of the client apparatus 2104 controls other unitsin the client apparatus 2104 in accordance with the user operation orcommands received by the communication unit 2114.

The control unit 2118 of the client apparatus 2104 controls a displayapparatus 2120 so as to display an image decoded by the decoding unit2116.

The control unit 2118 of the client apparatus 2104 also controls adisplay apparatus 2120 so as to display GUI (Graphical User Interface)to designate values of the parameters for the network camera 2102including the parameters for the encoding of the encoding unit 2108.

The control unit 2118 of the client apparatus 2104 also controls otherunits in the client apparatus 2104 in accordance with user operationinput to the GUI displayed by the display apparatus 2120.

The control unit 2118 of the client apparatus 2104 controls thecommunication unit 2114 of the client apparatus 2104 so as to transmitthe commands to the network camera 2102 which designate values of theparameters for the network camera 2102, in accordance with the useroperation input to the GUI displayed by the display apparatus 2120.

The network camera system 2100 may determine if the camera 2102 utilizeszoom or pan during the recording of video, and such information may beused when encoding a video stream as zooming or panning during filmingmay benefit from the use of affine mode which is well-suited to codingcomplex motion such as zooming, rotating and/or stretching (which may beside-effects of panning, in particular if the lens is a ‘fish eye’lens).

FIG. 21 is a diagram illustrating a smart phone 2200.

The smart phone 2200 includes a communication unit 2202, adecoding/encoding unit 2204, a control unit 2206 and a display unit2208.

The communication unit 2202 receives the encoded image data via network200.

The decoding unit 2204 decodes the encoded image data received by thecommunication unit 2202.

The decoding unit 2204 decodes the encoded image data by using saiddecoding methods explained in first to sixteenth embodiments. Thedecoding unit 2204 can use at least one of decoding methods explained infirst to sixteenth embodiments. For another instance, thedecoding/encoding unit 2204 can use combination of decoding methodsexplained in first to sixteenth embodiments.

The control unit 2206 controls other units in the smart phone 2200 inaccordance with a user operation or commands received by thecommunication unit 2202.

For example, the control unit 2206 controls a display apparatus 2208 soas to display an image decoded by the decoding unit 2204.

The smart phone may further comprise an image recording device 2210 (forexample a digital camera and associated circuitry) to record images orvideos. Such recorded images or videos may be encoded by thedecoding/encoding unit 2204 under instruction of the control unit 2206.

The smart phone may further comprise sensors 2212 adapted to sense theorientation of the mobile device. Such sensors could include anaccelerometer, gyroscope, compass, global positioning (GPS) unit orsimilar positional sensors. Such sensors 2212 can determine if the smartphone changes orientation and such information may be used when encodinga video stream as a change in orientation during filming may benefitfrom the use of affine mode which is well-suited to coding complexmotion such as rotations.

Alternatives and Modifications

It will be appreciated that an object of the present invention is toensure that affine mode is utilised in a most efficient manner, andcertain examples discussed above relate to signalling the use of affinemode in dependence on a perceived likelihood of affine mode beinguseful. A further example of this may apply to encoders when it is knownthat complex motion (where an affine transform may be particularlyefficient) is being encoded. Examples of such cases include:

-   -   a) A camera zooming in/out    -   b) A portable camera (e.g. a mobile phone) changing orientation        during filming (i.e. a rotational movement)    -   c) A ‘fisheye’ lens camera panning (e.g. a stretching/distortion        of a portion of the image

As such, an indication of complex motion may be raised during therecording process so that affine mode may be given a higher likelihoodof being used for the slice, sequence of frames or indeed the entirevideo stream.

In a further example, affine mode may be given a higher likelihood ofbeing used depending on a feature or functionality of the device used torecord the video. For example, a mobile device may be more likely tochange orientation than (say) a fixed security camera so affine mode maybe more appropriate for encoding video from the former. Examples offeatures or functionality include: the presence/use of zooming means,the presence/use of a positional sensor, the presence/use of panningmeans, whether or not the device is portable, or a user-selection on thedevice.

While the present invention has been described with reference toembodiments, it is to be understood that the invention is not limited tothe disclosed embodiments. It will be appreciated by those skilled inthe art that various changes and modification might be made withoutdeparting from the scope of the invention, as defined in the appendedclaims. All of the features disclosed in this specification (includingany accompanying claims, abstract and drawings), and/or all of the stepsof any method or process so disclosed, may be combined in anycombination, except combinations where at least some of such featuresand/or steps are mutually exclusive. Each feature disclosed in thisspecification (including any accompanying claims, abstract and drawings)may be replaced by alternative features serving the same, equivalent orsimilar purpose, unless expressly stated otherwise. Thus, unlessexpressly stated otherwise, each feature disclosed is one example onlyof a generic series of equivalent or similar features.

It is also understood that any result of comparison, determination,assessment, selection, execution, performing, or consideration describedabove, for example a selection made during an encoding or filteringprocess, may be indicated in or determinable/inferable from data in abitstream, for example a flag or data indicative of the result, so thatthe indicated or determined/inferred result can be used in theprocessing instead of actually performing the comparison, determination,assessment, selection, execution, performing, or consideration, forexample during a decoding process.

In the claims, the word “comprising” does not exclude other elements orsteps, and the indefinite article “a” or “an” does not exclude aplurality. The mere fact that different features are recited in mutuallydifferent dependent claims does not indicate that a combination of thesefeatures cannot be advantageously used.

Reference numerals appearing in the claims are by way of illustrationonly and shall have no limiting effect on the scope of the claims.

In the preceding embodiments, the functions described may be implementedin hardware, software, firmware, or any combination thereof. Ifimplemented in software, the functions may be stored on or transmittedover, as one or more instructions or code, a computer-readable mediumand executed by a hardware-based processing unit.

Computer-readable media may include computer-readable storage media,which corresponds to a tangible medium such as data storage media, orcommunication media including any medium that facilitates transfer of acomputer program from one place to another, e.g., according to acommunication protocol. In this manner, computer-readable mediagenerally may correspond to (1) tangible computer-readable storage mediawhich is non-transitory or (2) a communication medium such as a signalor carrier wave. Data storage media may be any available media that canbe accessed by one or more computers or one or more processors toretrieve instructions, code and/or data structures for implementation ofthe techniques described in this disclosure. A computer program productmay include a computer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablegate/logic arrays (FPGAs), or other equivalent integrated or discretelogic circuitry. Accordingly, the term “processor,” as used herein mayrefer to any of the foregoing structure or any other structure suitablefor implementation of the techniques described herein. In addition, insome aspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The invention claimed is:
 1. A method of encoding a motion informationpredictor index, comprising: determining, from a plurality of modes, oneof a first mode and a second mode as a mode for motion informationprediction of a block to be encoded, wherein the first mode is asubblock Merge mode with subblock Affine prediction and the second modeis a Merge mode without subblock Affine prediction; generating, when thefirst mode is used, a first list of first mode motion informationpredictor candidates, selecting one of the first mode motion informationpredictor candidates in the first list, generating a first motioninformation predictor index for the selected first mode motioninformation predictor candidate, and encoding the first motioninformation predictor index using CABAC coding, all bits except for afirst bit of the first motion information predictor index being coded bybypass coding and the first bit of the first motion informationpredictor index being coded by CABAC coding using a first contextvariable; generating, when the second mode is used, a second list ofsecond mode motion information predictor candidates without an Affinemotion information predictor candidate, selecting one of the second modemotion information predictor candidates in the second list, generating asecond motion information predictor index for the selected second modemotion information predictor candidate, and encoding the second motioninformation predictor index using CABAC coding, all bits except for afirst bit of the second motion information predictor index being codedby bypass coding and the first bit of the second motion informationpredictor index being coded by CABAC coding using a second contextvariable.
 2. The method as claimed in claim 1, further comprisingincluding data for determining a maximum number of motion informationpredictor candidates includable in the generated list of first or secondmode motion information predictor candidates in a bitstream.
 3. A methodof decoding a motion information predictor index, comprising:determining, from a plurality of modes, one of a first mode and a secondmode as a mode for motion information prediction of a block to bedecoded, wherein the first mode is a subblock Merge mode with subblockAffine prediction and the second mode is a Merge mode without subblockAffine prediction; generating, when the first mode is used, a first listof first mode motion information predictor candidates; generating, whenthe second mode is used, a second list of second mode motion informationpredictor candidates without an Affine motion information predictorcandidate; decoding, when the first mode is used, a first motioninformation predictor index using CABAC decoding, all bits except for afirst bit of the first motion information predictor index being decodedby bypass decoding and the first of the first motion informationpredictor index being decoded by CABAC decoding using a first contextvariable; decoding, when the second mode is used, a second motioninformation predictor index using CABAC decoding, all bits except for afirst bit of the second motion information predictor index being decodedby bypass decoding and the first bit of the second motion informationpredictor index being decoded by CABAC decoding using a second contextvariable; when the first mode is used, using the decoded first motioninformation predictor index to identify one of the first mode motioninformation predictor candidates in the first list; and when the secondmode is used, using the decoded second motion information predictorindex to identify one of the second mode motion information predictorcandidates in the second list.
 4. The method as claimed in claim 3,further comprising obtaining, from a bitstream, data for determining amaximum number of motion information predictor candidates includable inthe generated first or second list.
 5. The method as claimed in claim 4,wherein a motion information predictor candidate comprises informationfor obtaining a motion vector.
 6. The method as claimed in claim 4,wherein the generated list of first mode or second mode motioninformation predictor candidates includes a candidate for subblockcollocated temporal prediction.
 7. A device for encoding a motioninformation predictor index, comprising: a determiner which determines,from a plurality of modes, one of a first mode and a second mode as amode for motion information prediction of a block to be encoded, whereinthe first mode is a subblock Merge mode with subblock Affine predictionand the second mode is a Merge mode without subblock Affine prediction;a generator which, when the first mode is used, generates a first listof first mode motion information predictor candidates, and selects oneof the first mode motion information predictor candidates in the firstlist, and when the second mode is used, generates a second list ofsecond mode motion information predictor candidates without an Affinemotion information predictor candidate, and selects one of the secondmode motion information predictor candidates in the second list; anindex generator which, when the first mode is used, generates a firstmotion information predictor index for the selected first mode motioninformation predictor candidate, and when the second mode is used,generates a second motion information predictor index for the selectedsecond mode motion information predictor candidate; and an encoderwhich, when the first mode is used, encodes the first motion informationpredictor index using CABAC coding, all bits except for a first bit ofthe first motion information predictor index being coded by bypasscoding and the first bit of the first motion information predictor indexbeing coded by CABAC coding using a first context variable, and whereinthe encoder, when the second mode is used, encodes the second motioninformation predictor index using CABAC coding, all bits except for afirst bit of the second motion information predictor index being codedby bypass coding and the first bit of the second motion informationpredictor index being coded by the CABAC coding using a second contextvariable.
 8. A device for decoding a motion information predictor index,comprising: a determiner which determines, from a plurality of modes,one of a first mode and a second mode as a mode for motion informationprediction of a block to be decoded, wherein the first mode is asubblock Merge mode with subblock Affine prediction and the second modeis a Merge mode without subblock Affine prediction; a generator which,when the first mode is used, generates a first list of first mode motioninformation predictor candidates; and when the second mode is used,generates a second list of second mode motion information predictorcandidates without an Affine motion information predictor candidate; adecoder which, when the first mode is used, decodes a first motioninformation predictor index using CABAC decoding, all bits except for afirst bit of the first motion information predictor index being decodedby bypass decoding and the first bit of the first motion informationpredictor index being decoded by CABAC decoding, using a first contextvariable, and which, when the second mode is used, decodes a secondmotion information predictor index using CABAC decoding, all bits exceptfor a first bit of the second motion information predictor index beingdecoded by bypass decoding and the first bit of the second motioninformation predictor index being decoded by CABAC decoding using asecond context variable; an identifier which, when the first mode isused, uses the decoded first motion information predictor index toidentify one of the first mode motion information predictor candidatesin the first list, and when the second mode is used, uses the decodedsecond motion information predictor index to identify one of the secondmode motion information predictor candidates in the second list.
 9. Themethod as claimed in claim 1, wherein: the method further comprisesincluding data for indicating use of the first mode in a bitstream whenthe first mode is used.
 10. A non-transitory computer-readable carriermedium storing a program which, when executed by a programmableapparatus, causes the programmable apparatus to perform a method ofencoding a motion information predictor index, the method comprising:determining, from a plurality of modes, one of a first mode and a secondmode as a mode for motion information prediction of a block to beencoded, wherein the first mode is a subblock Merge mode with subblockAffine prediction and the second mode is a Merge mode without subblockAffine prediction; generating, when the first mode is used, a first listof first mode motion information predictor candidates, selecting one ofthe first mode motion information predictor candidates in the firstgenerating a first motion information predictor index for the selectedfirst mode motion information predictor candidate, and encoding thefirst motion information predictor index using CABAC coding, all bitsexcept for a first bit of the first motion information predictor indexbeing coded by bypass coding and the first bit of the first motioninformation predictor index being coded by CABAC coding using a firstcontext variable; generating, when the second mode is used, a secondlist of second mode motion information predictor candidates without anAffine motion information predictor candidate, selecting one of thesecond mode motion information predictor candidates in the second list,generating a second motion information predictor index for the selectedsecond mode motion information predictor candidate, and encoding thesecond motion information predictor index using CABAC coding, all bitsexcept for a first bit of the second motion information predictor indexbeing coded by bypass coding and the first bit of the second motioninformation predictor index being coded by CABAC coding using a secondcontext variable.
 11. A non-transitory computer-readable carrier mediumstoring a program which, when executed by a programmable apparatus,causes the programmable apparatus to perform a method of decoding amotion information predictor index, the method comprising: determining,from a plurality of modes, one of a first mode and a second mode as amode for motion information prediction of a block to be decoded, whereinthe first mode is a subblock Merge mode with subblock Affine predictionand the second mode is a Merge mode without subblock Affine prediction,generating, when the first mode is used, a first list of first modemotion information predictor candidates; generating, when the secondmode is used, a second list of second mode motion information predictorcandidates without an Affine motion information predictor candidate;decoding, when the first mode is used, a first motion informationpredictor index using CABAC decoding, all bits except for a first bit ofthe first motion information predictor index being decoded by bypassdecoding and the first bit of the first motion information predictorindex being decoded by CABAC decoding using a first context variable;decoding, when the second mode is used, a second motion informationpredictor index using CABAC decoding, all bits except for a first bit ofthe second motion information predictor index being decoded by bypassdecoding and the first bit of the second motion information predictorindex being decoded by CABAC decoding using a second context variable;when the first mode is used, using the decoded first motion informationpredictor index to identify one of the first mode motion informationpredictor candidates in the first list; and when the second mode isused, using the decoded second motion information predictor index toidentify one of the second mode motion information predictor candidatesin the second list.